* 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 3cdfce6af6c39efc93b0eda590a8bcd3fc2f06c0..6a520dd7e411e7539a97ef22066b13535a7d44d8 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 9723ddd0d7f99ebab23cf36c7eabbf0de23bb678..8f1062d90a7bc6583680693fbd80c760da8600d7 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;
 }