Fix PR12616 - gdb does not implement DW_AT_data_bit_offset
[deliverable/binutils-gdb.git] / gdb / dwarf2read.c
index 1ad6b000277d7168460600c6f92ceb3cbda5d9f5..558159aedad871ad5235e65b330bfcfd1dfbc9c7 100644 (file)
@@ -12584,6 +12584,10 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
                                 - bit_offset - FIELD_BITSIZE (*fp)));
            }
        }
+      attr = dwarf2_attr (die, DW_AT_data_bit_offset, cu);
+      if (attr != NULL)
+       SET_FIELD_BITPOS (*fp, (FIELD_BITPOS (*fp)
+                               + dwarf2_get_attr_constant_value (attr, 0)));
 
       /* Get name of field.  */
       fieldname = dwarf2_name (die, cu);
This page took 0.05147 seconds and 4 git commands to generate.