* dwarf2read.c (read_set_type): Set type length if
authorPierre Muller <muller@sourceware.org>
Mon, 17 May 2010 15:55:01 +0000 (15:55 +0000)
committerPierre Muller <muller@sourceware.org>
Mon, 17 May 2010 15:55:01 +0000 (15:55 +0000)
DW_AT_byte_size attribute is present.

gdb/ChangeLog
gdb/dwarf2read.c

index 0d2d43c..bf3d438 100644 (file)
@@ -1,5 +1,10 @@
 2010-05-17  Pierre Muller  <muller@ics.u-strasbg.fr>
 
+       * dwarf2read.c (read_set_type): Set type length if
+       DW_AT_byte_size attribute is present.
+
+2010-05-17  Pierre Muller  <muller@ics.u-strasbg.fr>
+
        * p-valprint.c (pascal_val_print): Handle set type if range limits
        are undefined but size is known.
 
index 2d69764..196fccc 100644 (file)
@@ -5547,7 +5547,10 @@ static struct type *
 read_set_type (struct die_info *die, struct dwarf2_cu *cu)
 {
   struct type *set_type = create_set_type (NULL, die_type (die, cu));
+  struct attribute *attr = dwarf2_attr (die, DW_AT_byte_size, cu);
 
+  if (attr)
+    TYPE_LENGTH (set_type) = DW_UNSND (attr);
   return set_die_type (die, set_type, cu);
 }