PR gdb/1179
authorDaniel Jacobowitz <drow@false.org>
Mon, 23 Jun 2003 19:51:38 +0000 (19:51 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 23 Jun 2003 19:51:38 +0000 (19:51 +0000)
* dwarfread.c (struct_type): Skip static fields without crashing.

gdb/ChangeLog
gdb/dwarfread.c

index f35b7db8cced6e6443ad64bbc08a6a74eb5d37a8..4d95fff1024188c83dcd9f649e0c63623d615d54 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-22  Daniel Jacobowitz  <drow@mvista.com>
+
+       PR gdb/1179
+       * dwarfread.c (struct_type): Skip static fields without crashing.
+
 2003-06-22  Andrew Cagney  <cagney@redhat.com>
 
        GDB 6.0 branch created.
index 0856b899dc54eb7b1e9bd6097d0cca783ca20c29..ff65db047e942d2255fa1864f850acc9ad0ce1a4 100644 (file)
@@ -979,6 +979,13 @@ struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
       switch (mbr.die_tag)
        {
        case TAG_member:
+         /* Static fields can be either TAG_global_variable (GCC) or else
+            TAG_member with no location (Diab).  We could treat the latter like
+            the former... but since we don't support the former, just avoid
+            crashing on the latter for now.  */
+         if (mbr.at_location == NULL)
+           break;
+
          /* Get space to record the next field's data.  */
          new = (struct nextfield *) alloca (sizeof (struct nextfield));
          new->next = list;
This page took 0.031569 seconds and 4 git commands to generate.