From f41f5e616a40673b56bf68aefb99ad7d94fd17ae Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 17 Apr 2012 13:55:32 +0000 Subject: 2012-04-17 Pedro Alves * 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. --- gdb/dwarf2read.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gdb/dwarf2read.c') 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))); } } -- cgit v1.1