diff options
author | Pedro Alves <palves@redhat.com> | 2012-04-17 13:55:32 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-04-17 13:55:32 +0000 |
commit | f41f5e616a40673b56bf68aefb99ad7d94fd17ae (patch) | |
tree | 14a8348372d2e2f747b8853f687626e7900f952f /gdb/dwarf2read.c | |
parent | 945b3a323089731de2e79dc318195c75d747435d (diff) | |
download | gdb-f41f5e616a40673b56bf68aefb99ad7d94fd17ae.zip gdb-f41f5e616a40673b56bf68aefb99ad7d94fd17ae.tar.gz gdb-f41f5e616a40673b56bf68aefb99ad7d94fd17ae.tar.bz2 |
2012-04-17 Pedro Alves <palves@redhat.com>
* gdbtypes.h (FIELD_BITPOS): Rename to ...
(FIELD_BITPOS_LVAL): ... this.
(FIELD_BITPOS): New.
(SET_FIELD_BITPOS): Adjust to use FIELD_BITPOS_LVAL.
* dwarf2read.c (dwarf2_add_field): Use SET_FIELD_BITPOS.
* gdbtypes.c (append_composite_type_field_aligned): Adjust to use
SET_FIELD_BITPOS.
* gnu-v3-abi.c (build_gdb_vtable_type): Adjust to use
SET_FIELD_BITPOS.
* stabsread.c (read_cpp_abbrev, read_one_struct_field)
(read_baseclasses): Adjust to use SET_FIELD_BITPOS.
* target-descriptions.c (tdesc_gdb_type): Adjust to use
SET_FIELD_BITPOS.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0e211ae..eec52fb 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -7066,7 +7066,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, anonymous object to the MSB of the field. We don't have to do anything special since we don't need to know the size of the anonymous object. */ - FIELD_BITPOS (*fp) += DW_UNSND (attr); + SET_FIELD_BITPOS (*fp, FIELD_BITPOS (*fp) + DW_UNSND (attr)); } else { @@ -7095,8 +7095,10 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, bit field. */ anonymous_size = TYPE_LENGTH (fp->type); } - FIELD_BITPOS (*fp) += anonymous_size * bits_per_byte - - bit_offset - FIELD_BITSIZE (*fp); + SET_FIELD_BITPOS (*fp, + (FIELD_BITPOS (*fp) + + anonymous_size * bits_per_byte + - bit_offset - FIELD_BITSIZE (*fp))); } } |