diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-14 11:23:33 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-14 11:23:33 +0000 |
commit | c8c1c22feaaf76ddd437776a3cdeaedf4695916a (patch) | |
tree | 39a5cbfd10fae9dee763225229f2e532e4d312ef /gdb/jv-valprint.c | |
parent | e6e4e7014d3721283cf0415cadb3c7f1a1200f7b (diff) | |
download | gdb-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.c | 7 |
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; } |