PR breakpoint/12803
[deliverable/binutils-gdb.git] / gdb / jv-valprint.c
index 0e5b97f10ccda85a67179a85cf1757caa3675d12..f49b17202372cf2435aae594702f89fff2da7f9c 100644 (file)
@@ -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;
                }
 
@@ -413,9 +416,7 @@ java_print_value_fields (struct type *type, const gdb_byte *valaddr,
                {
                  struct value_print_options opts;
 
-                 v = value_from_longest
-                   (TYPE_FIELD_TYPE (type, i),
-                    unpack_field_as_long (type, valaddr + offset, i));
+                 v = value_field_bitfield (type, i, valaddr, offset, val);
 
                  opts = *options;
                  opts.deref_ref = 0;
This page took 0.023611 seconds and 4 git commands to generate.