+2020-03-13 Tom Tromey <tom@tromey.com>
+
+ * ada-valprint.c (print_field_values): Call common_val_print.
+
2020-03-13 Tom Tromey <tom@tromey.com>
* ada-valprint.c (val_print_packed_array_elements): Remove
bit_size, TYPE_FIELD_TYPE (type, i));
opts = *options;
opts.deref_ref = 0;
- val_print (TYPE_FIELD_TYPE (type, i),
- value_embedded_offset (v), 0,
- stream, recurse + 1, v,
- &opts, language);
+ common_val_print (v, stream, recurse + 1, &opts, language);
}
}
else
struct value_print_options opts = *options;
opts.deref_ref = 0;
- val_print (TYPE_FIELD_TYPE (type, i),
- (offset + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT),
- 0, stream, recurse + 1, val, &opts, language);
+
+ LONGEST local_off = (offset + TYPE_FIELD_BITPOS (type, i)
+ / HOST_CHAR_BIT);
+ struct value *v = value_from_contents (TYPE_FIELD_TYPE (type, i),
+ valaddr + local_off);
+ common_val_print (v, stream, recurse + 1, &opts, language);
}
annotate_field_end ();
}