From c8c1c22feaaf76ddd437776a3cdeaedf4695916a Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 14 Feb 2011 11:23:33 +0000 Subject: 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. --- gdb/jv-valprint.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gdb/jv-valprint.c') 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; } -- cgit v1.1