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/m2-valprint.c | |
parent | b6cdac4b80c1d32726227305e16483cef9d40e2c (diff) | |
download | fsf-binutils-gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.zip fsf-binutils-gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.tar.gz fsf-binutils-gdb-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/m2-valprint.c')
-rw-r--r-- | gdb/m2-valprint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index 214466b..041bc18 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -55,8 +55,8 @@ get_long_set_bounds (struct type *type, LONGEST *low, LONGEST *high) i = TYPE_N_BASECLASSES (type); if (len == 0) return 0; - *low = TYPE_LOW_BOUND (TYPE_FIELD_TYPE (type, i)->index_type ()); - *high = TYPE_HIGH_BOUND (TYPE_FIELD_TYPE (type, len - 1)->index_type ()); + *low = TYPE_LOW_BOUND (type->field (i).type ()->index_type ()); + *high = TYPE_HIGH_BOUND (type->field (len - 1).type ()->index_type ()); return 1; } error (_("expecting long_set")); @@ -86,7 +86,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, if (get_long_set_bounds (type, &low_bound, &high_bound)) { field = TYPE_N_BASECLASSES (type); - range = TYPE_FIELD_TYPE (type, field)->index_type (); + range = type->field (field).type ()->index_type (); } else { @@ -101,7 +101,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, { for (i = low_bound; i <= high_bound; i++) { - bitval = value_bit_index (TYPE_FIELD_TYPE (type, field), + bitval = value_bit_index (type->field (field).type (), (TYPE_FIELD_BITPOS (type, field) / 8) + valaddr + embedded_offset, i); if (bitval < 0) @@ -136,7 +136,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, field++; if (field == len) break; - range = TYPE_FIELD_TYPE (type, field)->index_type (); + range = type->field (field).type ()->index_type (); if (get_discrete_bounds (range, &field_low, &field_high) < 0) break; target = TYPE_TARGET_TYPE (range); @@ -167,11 +167,11 @@ m2_print_unbounded_array (struct value *value, struct type *type = check_typedef (value_type (value)); const gdb_byte *valaddr = value_contents_for_printing (value); - addr = unpack_pointer (TYPE_FIELD_TYPE (type, 0), + addr = unpack_pointer (type->field (0).type (), (TYPE_FIELD_BITPOS (type, 0) / 8) + valaddr); - val = value_at_lazy (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0)), + val = value_at_lazy (TYPE_TARGET_TYPE (type->field (0).type ()), addr); len = unpack_field_as_long (type, valaddr, 1); |