OSDN Git Service

gdb/
authorjkratoch <jkratoch>
Thu, 13 Oct 2011 09:36:45 +0000 (09:36 +0000)
committerjkratoch <jkratoch>
Thu, 13 Oct 2011 09:36:45 +0000 (09:36 +0000)
* dwarf2read.c (dwarf2_fetch_die_location_block): Initialize .data even
if .size is 0.

gdb/ChangeLog
gdb/dwarf2read.c

index 479d7ce..e58ca80 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dwarf2read.c (dwarf2_fetch_die_location_block): Initialize .data even
+       if .size is 0.
+
 2011-10-13  Yao Qi  <yao@codesourcery.com>
 
        PR gdb/12703
index 5fa6c5b..99f67d9 100644 (file)
@@ -14217,8 +14217,10 @@ dwarf2_fetch_die_location_block (unsigned int offset,
   attr = dwarf2_attr (die, DW_AT_location, cu);
   if (!attr)
     {
-      /* DWARF: "If there is no such attribute, then there is no effect.".  */
+      /* DWARF: "If there is no such attribute, then there is no effect.".
+        DATA is ignored if SIZE is 0.  */
 
+      retval.data = NULL;
       retval.size = 0;
     }
   else if (attr_form_is_section_offset (attr))