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/rust-lang.c | |
parent | 2ad53ea10c14445d6074814bbdfe46bd787038cb (diff) | |
download | binutils-b610c04548a39dbce6d51c33d7a8125e59066939.zip binutils-b610c04548a39dbce6d51c33d7a8125e59066939.tar.gz binutils-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/rust-lang.c')
-rw-r--r-- | gdb/rust-lang.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 1da758f..e5a4041 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -686,8 +686,8 @@ rust_print_struct_def (struct type *type, const char *varstring, std::sort (fields.begin (), fields.end (), [&] (int a, int b) { - return (TYPE_FIELD_BITPOS (type, a) - < TYPE_FIELD_BITPOS (type, b)); + return (type->field (a).loc_bitpos () + < type->field (b).loc_bitpos ()); }); for (int i : fields) @@ -943,7 +943,7 @@ rust_composite_type (struct type *original, if (i > 0) TYPE_LENGTH (result) - = (TYPE_FIELD_BITPOS (result, i - 1) / TARGET_CHAR_BIT + + = (result->field (i - 1).loc_bitpos () / TARGET_CHAR_BIT + TYPE_LENGTH (result->field (i - 1).type ())); return result; } |