diff options
author | Pedro Alves <pedro@codesourcery.com> | 2011-02-14 11:23:33 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2011-02-14 11:23:33 +0000 |
commit | 3db04b22333047072e92464fff090246e5a570d8 (patch) | |
tree | 13da58cad8426459e7295f818b7d30e7482c79b8 /gdb/jv-valprint.c | |
parent | 67d3c91a65d1fb133b1a45386cbc27bed1fe1490 (diff) | |
download | gdb-3db04b22333047072e92464fff090246e5a570d8.tar.gz |
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 0e5b97f10cc..bed9b2f396c 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; } |