* stabsread.c (read_type): Skip type attributes if present.
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 31 May 1993 20:14:59 +0000 (20:14 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 31 May 1993 20:14:59 +0000 (20:14 +0000)
gdb/ChangeLog
gdb/stabsread.c

index c60a58bb3bbfbb59645d4ac42fb7fa44b74674ba..e4ba053169c610cf830c083fd54aa96f52433ceb 100644 (file)
@@ -1,5 +1,7 @@
 Mon May 31 10:37:04 1993  Jim Kingdon  (kingdon@cygnus.com)
 
+       * stabread.c (read_type): Skip type attributes if present.
+
        * stabsread.c (read_huge_number): Don't accept '0' + radix as part
        of number, just through '0' + radix - 1.
 
index 0fdacb0cbfb1166a7640bdb4525bd55ecafa7d1c..84edc569e5df80ed9325c9c0c5b7835b4ba78c75 100644 (file)
@@ -1255,22 +1255,31 @@ read_type (pp, objfile)
        return dbx_alloc_type (typenums, objfile);
 
       /* Type is being defined here.  */
-#if 0 /* Callers aren't prepared for a NULL result!  FIXME -- metin!  */
-      {
-       struct type *tt;
-
-       /* if such a type already exists, this is an unnecessary duplication
-          of the stab string, which is common in (RS/6000) xlc generated
-          objects.  In that case, simply return NULL and let the caller take
-          care of it. */
-
-       tt = *dbx_lookup_type (typenums);
-       if (tt && tt->length && tt->code)
-         return NULL;
-      }
-#endif
+      /* Skip the '='.  */
+      ++(*pp);
 
-      *pp += 2;
+      while (**pp == '@')
+       {
+         char *p = *pp + 1;
+         /* It might be a type attribute or a member type.  */
+         if (isdigit (*p) || *p ==  '(' || *p == '-')
+           /* Member type.  */
+           break;
+         else
+           {
+             /* Type attributes; skip to the semicolon.  */
+             while (*p != ';' && *p != '\0')
+               ++p;
+             *pp = p;
+             if (*p == '\0')
+               return error_type (pp);
+             else
+               /* Skip the semicolon.  */
+               ++*pp;
+           }
+       }
+      /* Skip the type descriptor, we get it below with (*pp)[-1].  */
+      ++(*pp);
     }
   else
     {
This page took 0.029827 seconds and 4 git commands to generate.