diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-26 16:36:15 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-10-29 16:44:44 -0400 |
commit | b610c04548a39dbce6d51c33d7a8125e59066939 (patch) | |
tree | 9ebf5e8721754311148f61ea22e71126a8318574 /gdb/valops.c | |
parent | 2ad53ea10c14445d6074814bbdfe46bd787038cb (diff) | |
download | gdb-b610c04548a39dbce6d51c33d7a8125e59066939.zip gdb-b610c04548a39dbce6d51c33d7a8125e59066939.tar.gz gdb-b610c04548a39dbce6d51c33d7a8125e59066939.tar.bz2 |
gdb: remove TYPE_FIELD_BITPOS
Remove TYPE_FIELD_BITPOS, replace its uses with type::field +
field::loc_bitpos.
Change-Id: Iccd8d5a77e5352843a837babaa6bd284162e0320
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index a80bdf0..0d02584 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2030,8 +2030,8 @@ struct_field_searcher::search (struct value *arg1, LONGEST offset, have to add the offset of the union here. */ if (field_type->code () == TYPE_CODE_STRUCT || (field_type->num_fields () > 0 - && TYPE_FIELD_BITPOS (field_type, 0) == 0)) - new_offset += TYPE_FIELD_BITPOS (type, i) / 8; + && field_type->field (0).loc_bitpos () == 0)) + new_offset += type->field (i).loc_bitpos () / 8; search (arg1, new_offset, field_type); } @@ -2430,7 +2430,7 @@ value_struct_elt_bitpos (struct value **argp, int bitpos, struct type *ftype, for (i = TYPE_N_BASECLASSES (t); i < t->num_fields (); i++) { if (!field_is_static (&t->field (i)) - && bitpos == TYPE_FIELD_BITPOS (t, i) + && bitpos == t->field (i).loc_bitpos () && types_equal (ftype, t->field (i).type ())) return value_primitive_field (*argp, 0, i, t); } @@ -3518,7 +3518,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, if (want_address) return value_from_longest (lookup_memberptr_type (t->field (i).type (), domain), - offset + (LONGEST) (TYPE_FIELD_BITPOS (t, i) >> 3)); + offset + (LONGEST) (t->field (i).loc_bitpos () >> 3)); else if (noside != EVAL_NORMAL) return allocate_value (t->field (i).type ()); else |