* dwarf2read.c (read_attribute_value): Issue a complaint when
authorJoel Brobecker <brobecker@gnat.com>
Fri, 27 Jun 2008 17:56:47 +0000 (17:56 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 27 Jun 2008 17:56:47 +0000 (17:56 +0000)
        adjusting size attribute values of 0xffffffff as zero.

gdb/ChangeLog
gdb/dwarf2read.c

index 3cdfce6..6a520dd 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-27  Joel Brobecker  <brobecker@adacore.com>
+
+       * dwarf2read.c (read_attribute_value): Issue a complaint when
+       adjusting size attribute values of 0xffffffff as zero.
+
 2008-06-27  Joseph Myers  <joseph@codesourcery.com>
 
        * i386-tdep.c (i386_16_byte_align_p): New.
index 9723ddd..8f1062d 100644 (file)
@@ -6244,7 +6244,13 @@ read_attribute_value (struct attribute *attr, unsigned form,
   if (attr->name == DW_AT_byte_size
       && form == DW_FORM_data4
       && DW_UNSND (attr) >= 0xffffffff)
-    DW_UNSND (attr) = 0;
+    {
+      complaint
+        (&symfile_complaints,
+         _("Suspicious DW_AT_byte_size value treated as zero instead of 0x%lx"),
+         DW_UNSND (attr));
+      DW_UNSND (attr) = 0;
+    }
 
   return info_ptr;
 }