diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-08-31 11:46:27 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-08-31 13:16:14 -0400 |
commit | 3757d2d44f63b446469723e0a7a8c0dc2f695a6c (patch) | |
tree | d649580e7a3b2b92ab132bd623443695bcfc0bc0 /gdb/gdbtypes.c | |
parent | 3be8c91910114853a64ab87fd1efaef220bb0205 (diff) | |
download | fsf-binutils-gdb-3757d2d44f63b446469723e0a7a8c0dc2f695a6c.zip fsf-binutils-gdb-3757d2d44f63b446469723e0a7a8c0dc2f695a6c.tar.gz fsf-binutils-gdb-3757d2d44f63b446469723e0a7a8c0dc2f695a6c.tar.bz2 |
gdb: remove TYPE_FIELD_BITSIZE
Replace with type::field + field::bitsize.
Change-Id: I2a24755a33683e4a2775a6d2a7b7a9ae7362e43a
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index cd6b191..59ddd75 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1317,12 +1317,12 @@ update_static_array_size (struct type *type) if (element_type->code () == TYPE_CODE_ARRAY && (stride != 0 || element_type->is_multi_dimensional ()) && element_type->length () != 0 - && TYPE_FIELD_BITSIZE (element_type, 0) != 0 + && element_type->field (0).bitsize () != 0 && get_array_bounds (element_type, &low_bound, &high_bound) && high_bound >= low_bound) type->field (0).set_bitsize ((high_bound - low_bound + 1) - * TYPE_FIELD_BITSIZE (element_type, 0)); + * element_type->field (0).bitsize ()); return true; } @@ -2330,7 +2330,7 @@ resolve_dynamic_array_or_string_1 (struct type *type, } } else - bit_stride = TYPE_FIELD_BITSIZE (type, 0); + bit_stride = type->field (0).bitsize (); type_allocator alloc (type, type_allocator::SMASH); return create_array_type_with_stride (alloc, elt_type, range_type, NULL, @@ -2550,7 +2550,7 @@ compute_variant_fields_inner (struct type *type, + (type->field (idx).loc_bitpos () / TARGET_CHAR_BIT)); - LONGEST bitsize = TYPE_FIELD_BITSIZE (type, idx); + LONGEST bitsize = type->field (idx).bitsize (); LONGEST size = bitsize / 8; if (size == 0) size = type->field (idx).type ()->length (); @@ -2704,8 +2704,8 @@ resolve_dynamic_struct (struct type *type, == FIELD_LOC_KIND_BITPOS); new_bit_length = resolved_type->field (i).loc_bitpos (); - if (TYPE_FIELD_BITSIZE (resolved_type, i) != 0) - new_bit_length += TYPE_FIELD_BITSIZE (resolved_type, i); + if (resolved_type->field (i).bitsize () != 0) + new_bit_length += resolved_type->field (i).bitsize (); else { struct type *real_type @@ -5349,7 +5349,7 @@ recursive_dump_type (struct type *type, int spaces) else gdb_printf ("%*s[%d] bitpos %s bitsize %d type ", spaces + 2, "", idx, plongest (type->field (idx).loc_bitpos ()), - TYPE_FIELD_BITSIZE (type, idx)); + type->field (idx).bitsize ()); gdb_printf ("%s name '%s' (%s)\n", host_address_to_string (type->field (idx).type ()), type->field (idx).name () != NULL @@ -5543,7 +5543,7 @@ copy_type_recursive (struct type *type, htab_t copied_types) { new_type->field (i).set_is_artificial (type->field (i).is_artificial ()); - new_type->field (i).set_bitsize (TYPE_FIELD_BITSIZE (type, i)); + new_type->field (i).set_bitsize (type->field (i).bitsize ()); if (type->field (i).type ()) new_type->field (i).set_type (copy_type_recursive (type->field (i).type (), copied_types)); |