aboutsummaryrefslogtreecommitdiff
path: root/gdb/jv-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/jv-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/jv-valprint.c')
-rw-r--r--gdb/jv-valprint.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 0e5b97f..bed9b2f 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -179,8 +179,11 @@ java_value_print (struct value *val, struct ui_file *stream,
set_value_lazy (next_v, 1);
set_value_offset (next_v, value_offset (next_v)
+ TYPE_LENGTH (el_type));
- if (memcmp (value_contents (v), value_contents (next_v),
- TYPE_LENGTH (el_type)) != 0)
+ value_fetch_lazy (next_v);
+ if (!(value_available_contents_eq
+ (v, value_embedded_offset (v),
+ next_v, value_embedded_offset (next_v),
+ TYPE_LENGTH (el_type))))
break;
}