diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-06-08 15:26:20 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-06-08 15:26:31 -0400 |
commit | 940da03e32c28144134d0373faf7fd5ea158f1ae (patch) | |
tree | a104a5666df69b0a45c5e5d04aba70cb10410dad /gdb/ada-valprint.c | |
parent | b6cdac4b80c1d32726227305e16483cef9d40e2c (diff) | |
download | binutils-940da03e32c28144134d0373faf7fd5ea158f1ae.zip binutils-940da03e32c28144134d0373faf7fd5ea158f1ae.tar.gz binutils-940da03e32c28144134d0373faf7fd5ea158f1ae.tar.bz2 |
gdb: remove TYPE_FIELD_TYPE macro
Remove the `TYPE_FIELD_TYPE` macro, changing all the call sites to use
`type::field` and `field::type` directly.
gdb/ChangeLog:
* gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
to use type::field and field::type instead.
Change-Id: Ifda6226a25c811cfd334a756a9fbc5c0afdddff3
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r-- | gdb/ada-valprint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index d295e55..a36e7ca 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -542,7 +542,7 @@ print_variant_part (struct value *value, int field_num, const struct language_defn *language) { struct type *type = value_type (value); - struct type *var_type = TYPE_FIELD_TYPE (type, field_num); + struct type *var_type = type->field (field_num).type (); int which = ada_which_variant_applies (var_type, outer_value); if (which < 0) @@ -617,7 +617,7 @@ print_field_values (struct value *value, struct value *outer_value, wrap_here (n_spaces (2 + 2 * recurse)); } - annotate_field_begin (TYPE_FIELD_TYPE (type, i)); + annotate_field_begin (type->field (i).type ()); fprintf_filtered (stream, "%.*s", ada_name_prefix_len (TYPE_FIELD_NAME (type, i)), TYPE_FIELD_NAME (type, i)); @@ -641,12 +641,12 @@ print_field_values (struct value *value, struct value *outer_value, int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; - adjust_type_signedness (TYPE_FIELD_TYPE (type, i)); + adjust_type_signedness (type->field (i).type ()); v = ada_value_primitive_packed_val (value, nullptr, bit_pos / HOST_CHAR_BIT, bit_pos % HOST_CHAR_BIT, - bit_size, TYPE_FIELD_TYPE (type, i)); + bit_size, type->field (i).type ()); opts = *options; opts.deref_ref = 0; common_val_print (v, stream, recurse + 1, &opts, language); |