Change print_field_values to use value-based API
This converts print_field_values to use the value-based API, by having it call common_val_print rather than val_print. gdb/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * ada-valprint.c (print_field_values): Call common_val_print.
This commit is contained in:
parent
b59eac3732
commit
3a916a9757
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
2020-03-13 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* ada-valprint.c (val_print_packed_array_elements): Remove
|
* ada-valprint.c (val_print_packed_array_elements): Remove
|
||||||
|
@ -684,10 +684,7 @@ print_field_values (struct type *type, const gdb_byte *valaddr,
|
|||||||
bit_size, TYPE_FIELD_TYPE (type, i));
|
bit_size, TYPE_FIELD_TYPE (type, i));
|
||||||
opts = *options;
|
opts = *options;
|
||||||
opts.deref_ref = 0;
|
opts.deref_ref = 0;
|
||||||
val_print (TYPE_FIELD_TYPE (type, i),
|
common_val_print (v, stream, recurse + 1, &opts, language);
|
||||||
value_embedded_offset (v), 0,
|
|
||||||
stream, recurse + 1, v,
|
|
||||||
&opts, language);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -695,9 +692,12 @@ print_field_values (struct type *type, const gdb_byte *valaddr,
|
|||||||
struct value_print_options opts = *options;
|
struct value_print_options opts = *options;
|
||||||
|
|
||||||
opts.deref_ref = 0;
|
opts.deref_ref = 0;
|
||||||
val_print (TYPE_FIELD_TYPE (type, i),
|
|
||||||
(offset + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT),
|
LONGEST local_off = (offset + TYPE_FIELD_BITPOS (type, i)
|
||||||
0, stream, recurse + 1, val, &opts, language);
|
/ 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 ();
|
annotate_field_end ();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user