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/value.c | |
parent | b6cdac4b80c1d32726227305e16483cef9d40e2c (diff) | |
download | gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.zip gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.tar.gz 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/value.c')
-rw-r--r-- | gdb/value.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/value.c b/gdb/value.c index cb86050..97a099d 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2838,7 +2838,7 @@ value_static_field (struct type *type, int fieldno) switch (TYPE_FIELD_LOC_KIND (type, fieldno)) { case FIELD_LOC_KIND_PHYSADDR: - retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno), + retval = value_at_lazy (type->field (fieldno).type (), TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)); break; case FIELD_LOC_KIND_PHYSNAME: @@ -2853,7 +2853,7 @@ value_static_field (struct type *type, int fieldno) reported as non-debuggable symbols. */ struct bound_minimal_symbol msym = lookup_minimal_symbol (phys_name, NULL, NULL); - struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); + struct type *field_type = type->field (fieldno).type (); if (!msym.minsym) retval = allocate_optimized_out_value (field_type); @@ -2906,7 +2906,7 @@ value_primitive_field (struct value *arg1, LONGEST offset, int unit_size = gdbarch_addressable_memory_unit_size (arch); arg_type = check_typedef (arg_type); - type = TYPE_FIELD_TYPE (arg_type, fieldno); + type = arg_type->field (fieldno).type (); /* Call check_typedef on our type to make sure that, if TYPE is a TYPE_CODE_TYPEDEF, its length is set to the length @@ -3158,7 +3158,7 @@ unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, { int bitpos = TYPE_FIELD_BITPOS (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); - struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); + struct type *field_type = type->field (fieldno).type (); int bit_offset; gdb_assert (val != NULL); @@ -3181,7 +3181,7 @@ unpack_field_as_long (struct type *type, const gdb_byte *valaddr, int fieldno) { int bitpos = TYPE_FIELD_BITPOS (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); - struct type *field_type = TYPE_FIELD_TYPE (type, fieldno); + struct type *field_type = type->field (fieldno).type (); return unpack_bits_as_long (field_type, valaddr, bitpos, bitsize); } @@ -3246,7 +3246,7 @@ value_field_bitfield (struct type *type, int fieldno, { int bitpos = TYPE_FIELD_BITPOS (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); - struct value *res_val = allocate_value (TYPE_FIELD_TYPE (type, fieldno)); + struct value *res_val = allocate_value (type->field (fieldno).type ()); unpack_value_bitfield (res_val, bitpos, bitsize, valaddr, embedded_offset, val); |