* strerror.c: Revert last change. Declare static sys_nerr
[deliverable/binutils-gdb.git] / gdb / stabsread.c
index cf7a21bf6de2d06b93cee0cc4c3c4fe7abb7797c..bb89edb65b14c0832917a2edbbcab6c61e0acf67 100644 (file)
@@ -105,6 +105,8 @@ static void fix_common_block (struct symbol *, int);
 
 static int read_type_number (char **, int *);
 
+static struct type *read_type (char **, struct objfile *);
+
 static struct type *read_range_type (char **, int[2], struct objfile *);
 
 static struct type *read_sun_builtin_type (char **, int[2], struct objfile *);
@@ -146,6 +148,8 @@ static struct type *read_array_type (char **, struct type *,
 
 static struct field *read_args (char **, int, struct objfile *, int *, int *);
 
+static void add_undefined_type (struct type *);
+
 static int
 read_cpp_abbrev (struct field_info *, char **, struct type *,
                 struct objfile *);
@@ -248,14 +252,14 @@ static struct symbol *current_symbol = NULL;
    This can be used for finding the type associated with that pair
    or for associating a new type with the pair.  */
 
-struct type **
+static struct type **
 dbx_lookup_type (int typenums[2])
 {
-  register int filenum = typenums[0];
-  register int index = typenums[1];
+  int filenum = typenums[0];
+  int index = typenums[1];
   unsigned old_len;
-  register int real_filenum;
-  register struct header_file *f;
+  int real_filenum;
+  struct header_file *f;
   int f_orig_length;
 
   if (filenum == -1)           /* -1,-1 is for temporary types.  */
@@ -352,7 +356,7 @@ dbx_lookup_type (int typenums[2])
 static struct type *
 dbx_alloc_type (int typenums[2], struct objfile *objfile)
 {
-  register struct type **type_addr;
+  struct type **type_addr;
 
   if (typenums[0] == -1)
     {
@@ -418,7 +422,7 @@ patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs,
                               sizeof (struct symbol));
 
              memset (sym, 0, sizeof (struct symbol));
-             SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+             SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
              SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT;
              DEPRECATED_SYMBOL_NAME (sym) =
                obsavestring (name, pp - name, &objfile->symbol_obstack);
@@ -464,7 +468,7 @@ patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs,
    Returns 0 for success, -1 for error.  */
 
 static int
-read_type_number (register char **pp, register int *typenums)
+read_type_number (char **pp, int *typenums)
 {
   int nbits;
   if (**pp == '(')
@@ -677,7 +681,7 @@ read_type_number (register char **pp, register int *typenums)
 // OBSOLETE        return 1;
 // OBSOLETE      }
 // OBSOLETE    /* FIXME! attach base info to type */
-// OBSOLETE    bsym = lookup_symbol (bname, 0, STRUCT_NAMESPACE, 0, 0);        /*demangled_name */
+// OBSOLETE    bsym = lookup_symbol (bname, 0, STRUCT_DOMAIN, 0, 0);   /*demangled_name */
 // OBSOLETE    if (bsym)
 // OBSOLETE      {
 // OBSOLETE        new->field.type = SYMBOL_TYPE (bsym);
@@ -750,7 +754,7 @@ read_type_number (register char **pp, register int *typenums)
 // OBSOLETE      sublist_count++;
 // OBSOLETE      fname++;
 // OBSOLETE    }
-// OBSOLETE        ref_func = lookup_symbol (fname, 0, VAR_NAMESPACE, 0, 0);           /* demangled name */
+// OBSOLETE        ref_func = lookup_symbol (fname, 0, VAR_DOMAIN, 0, 0);              /* demangled name */
 // OBSOLETE        if (!ref_func)
 // OBSOLETE    {
 // OBSOLETE      complaint (&symfile_complaints,
@@ -946,7 +950,7 @@ read_type_number (register char **pp, register int *typenums)
 // OBSOLETE    /* Find symbol's internal gdb reference using demangled_name.
 // OBSOLETE       This is the real sym that we want; 
 // OBSOLETE       sym was a temp hack to make debugger happy */
-// OBSOLETE    ref_sym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), 0, STRUCT_NAMESPACE, 0, 0);
+// OBSOLETE    ref_sym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), 0, STRUCT_DOMAIN, 0, 0);
 // OBSOLETE    type = SYMBOL_TYPE (ref_sym);
 
 
@@ -1207,16 +1211,15 @@ symbol_reference_defined (char **string)
     }
 }
 
-/* ARGSUSED */
 struct symbol *
 define_symbol (CORE_ADDR valu, char *string, int desc, int type,
               struct objfile *objfile)
 {
-  register struct symbol *sym;
+  struct symbol *sym;
   char *p = (char *) find_name_end (string);
   int deftype;
   int synonym = 0;
-  register int i;
+  int i;
 
   /* We would like to eliminate nameless symbols, but keep their types.
      E.g. stab entry ":t10=*2" should produce a type 10, which is a pointer
@@ -1379,7 +1382,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
        {
          SYMBOL_CLASS (sym) = LOC_CONST;
          SYMBOL_TYPE (sym) = error_type (&p, objfile);
-         SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+         SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
          add_symbol_to_list (sym, &file_symbols);
          return sym;
        }
@@ -1472,7 +1475,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
            SYMBOL_TYPE (sym) = error_type (&p, objfile);
          }
        }
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &file_symbols);
       return sym;
 
@@ -1480,7 +1483,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       /* The name of a caught exception.  */
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_LABEL;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       SYMBOL_VALUE_ADDRESS (sym) = valu;
       add_symbol_to_list (sym, &local_symbols);
       break;
@@ -1489,7 +1492,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       /* A static function definition.  */
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_BLOCK;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &file_symbols);
       /* fall into process_function_types.  */
 
@@ -1560,7 +1563,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       /* A global function definition.  */
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_BLOCK;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &global_symbols);
       goto process_function_types;
 
@@ -1571,7 +1574,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
          These definitions appear at the end of the namelist.  */
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_STATIC;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       /* Don't add symbol references to global_sym_chain.
          Symbol references don't have valid names and wont't match up with
          minimal symbols when the global_sym_chain is relocated.
@@ -1593,7 +1596,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_LOCAL;
       SYMBOL_VALUE (sym) = valu;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -1613,7 +1616,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
 
       SYMBOL_CLASS (sym) = LOC_ARG;
       SYMBOL_VALUE (sym) = valu;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &local_symbols);
 
       if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG)
@@ -1725,7 +1728,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
                               SYMBOL_PRINT_NAME (sym));
          SYMBOL_VALUE (sym) = SP_REGNUM;       /* Known safe, though useless */
        }
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -1741,20 +1744,23 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
                               SYMBOL_PRINT_NAME (sym));
          SYMBOL_VALUE (sym) = SP_REGNUM;       /* Known safe, though useless */
        }
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       if (within_function)
        {
-         /* Sun cc uses a pair of symbols, one 'p' and one 'r' with the same
-            name to represent an argument passed in a register.
-            GCC uses 'P' for the same case.  So if we find such a symbol pair
-            we combine it into one 'P' symbol.  For Sun cc we need to do this
-            regardless of REG_STRUCT_HAS_ADDR, because the compiler puts out
-            the 'p' symbol even if it never saves the argument onto the stack.
-
-            On most machines, we want to preserve both symbols, so that
-            we can still get information about what is going on with the
-            stack (VAX for computing args_printed, using stack slots instead
-            of saved registers in backtraces, etc.).
+         /* Sun cc uses a pair of symbols, one 'p' and one 'r', with
+            the same name to represent an argument passed in a
+            register.  GCC uses 'P' for the same case.  So if we find
+            such a symbol pair we combine it into one 'P' symbol.
+            For Sun cc we need to do this regardless of
+            stabs_argument_has_addr, because the compiler puts out
+            the 'p' symbol even if it never saves the argument onto
+            the stack.
+
+            On most machines, we want to preserve both symbols, so
+            that we can still get information about what is going on
+            with the stack (VAX for computing args_printed, using
+            stack slots instead of saved registers in backtraces,
+            etc.).
 
             Note that this code illegally combines
             main(argc) struct foo argc; { register struct foo argc; }
@@ -1764,13 +1770,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
          if (local_symbols
              && local_symbols->nsyms > 0
 #ifndef USE_REGISTER_NOT_ARG
-             && REG_STRUCT_HAS_ADDR_P ()
-             && REG_STRUCT_HAS_ADDR (processing_gcc_compilation,
-                                     SYMBOL_TYPE (sym))
-             && (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT
-                 || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION
-                 || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_SET
-                 || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_BITSTRING)
+             && gdbarch_stabs_argument_has_addr (current_gdbarch,
+                                                 SYMBOL_TYPE (sym))
 #endif
            )
            {
@@ -1812,7 +1813,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
            }
        }
 #endif
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &file_symbols);
       break;
 
@@ -1827,7 +1828,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
 
       SYMBOL_CLASS (sym) = LOC_TYPEDEF;
       SYMBOL_VALUE (sym) = valu;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       /* C++ vagaries: we may have a type which is derived from
          a base type which did not have its name defined when the
          derived class was output.  We fill in the derived class's
@@ -1928,7 +1929,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
 
       SYMBOL_CLASS (sym) = LOC_TYPEDEF;
       SYMBOL_VALUE (sym) = valu;
-      SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
       if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)
        TYPE_TAG_NAME (SYMBOL_TYPE (sym))
          = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
@@ -1937,12 +1938,12 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       if (synonym)
        {
          /* Clone the sym and then modify it. */
-         register struct symbol *typedef_sym = (struct symbol *)
+         struct symbol *typedef_sym = (struct symbol *)
          obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
          *typedef_sym = *sym;
          SYMBOL_CLASS (typedef_sym) = LOC_TYPEDEF;
          SYMBOL_VALUE (typedef_sym) = valu;
-         SYMBOL_NAMESPACE (typedef_sym) = VAR_NAMESPACE;
+         SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN;
          if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
            TYPE_NAME (SYMBOL_TYPE (sym))
              = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
@@ -1967,7 +1968,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
            }
        }
 #endif
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
        add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -1976,7 +1977,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_REF_ARG;
       SYMBOL_VALUE (sym) = valu;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -1992,7 +1993,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
                               SYMBOL_PRINT_NAME (sym));
          SYMBOL_VALUE (sym) = SP_REGNUM;       /* Known safe, though useless */
        }
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -2004,7 +2005,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       SYMBOL_TYPE (sym) = read_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_LOCAL;
       SYMBOL_VALUE (sym) = valu;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &local_symbols);
       break;
 #if 0 /* OBSOLETE CFront */
@@ -2027,7 +2028,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
 // OBSOLETE        SYMBOL_TYPE (sym) = error_type (&p, objfile);       /* FIXME! change later */
 // OBSOLETE        SYMBOL_CLASS (sym) = LOC_CONST;
 // OBSOLETE        SYMBOL_VALUE (sym) = 0;
-// OBSOLETE        SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+// OBSOLETE        SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
 // OBSOLETE        /* Don't add to list - we'll delete it later when 
 // OBSOLETE           we add the continuation to the real sym */
 // OBSOLETE        return sym;
@@ -2038,34 +2039,26 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
       SYMBOL_TYPE (sym) = error_type (&p, objfile);
       SYMBOL_CLASS (sym) = LOC_CONST;
       SYMBOL_VALUE (sym) = 0;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       add_symbol_to_list (sym, &file_symbols);
       break;
     }
 
-  /* When passing structures to a function, some systems sometimes pass
-     the address in a register, not the structure itself. */
+  /* Some systems pass variables of certain types by reference instead
+     of by value, i.e. they will pass the address of a structure (in a
+     register or on the stack) instead of the structure itself.  */
 
-  if (REG_STRUCT_HAS_ADDR_P ()
-      && REG_STRUCT_HAS_ADDR (processing_gcc_compilation, SYMBOL_TYPE (sym))
+  if (gdbarch_stabs_argument_has_addr (current_gdbarch, SYMBOL_TYPE (sym))
       && (SYMBOL_CLASS (sym) == LOC_REGPARM || SYMBOL_CLASS (sym) == LOC_ARG))
     {
-      struct type *symbol_type = check_typedef (SYMBOL_TYPE (sym));
-
-      if ((TYPE_CODE (symbol_type) == TYPE_CODE_STRUCT)
-         || (TYPE_CODE (symbol_type) == TYPE_CODE_UNION)
-         || (TYPE_CODE (symbol_type) == TYPE_CODE_BITSTRING)
-         || (TYPE_CODE (symbol_type) == TYPE_CODE_SET))
-       {
-         /* If REG_STRUCT_HAS_ADDR yields non-zero we have to convert
-            LOC_REGPARM to LOC_REGPARM_ADDR for structures and unions. */
-         if (SYMBOL_CLASS (sym) == LOC_REGPARM)
-           SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
-         /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th
-            and subsequent arguments on the sparc, for example).  */
-         else if (SYMBOL_CLASS (sym) == LOC_ARG)
-           SYMBOL_CLASS (sym) = LOC_REF_ARG;
-       }
+      /* We have to convert LOC_REGPARM to LOC_REGPARM_ADDR (for
+         variables passed in a register).  */
+      if (SYMBOL_CLASS (sym) == LOC_REGPARM)
+       SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
+      /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th
+        and subsequent arguments on SPARC, for example).  */
+      else if (SYMBOL_CLASS (sym) == LOC_ARG)
+       SYMBOL_CLASS (sym) = LOC_REF_ARG;
     }
 
   /* Is there more to parse?  For example LRS/alias information?  */
@@ -2259,10 +2252,10 @@ error_type (char **pp, struct objfile *objfile)
    assume that type information starts with a digit, '-', or '(' in
    deciding whether to call read_type.  */
 
-struct type *
-read_type (register char **pp, struct objfile *objfile)
+static struct type *
+read_type (char **pp, struct objfile *objfile)
 {
-  register struct type *type = 0;
+  struct type *type = 0;
   struct type *type1;
   int typenums[2];
   char type_descriptor;
@@ -2393,7 +2386,7 @@ again:
              struct symbol *sym = ppt->symbol[i];
 
              if (SYMBOL_CLASS (sym) == LOC_TYPEDEF
-                 && SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE
+                 && SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
                  && (TYPE_CODE (SYMBOL_TYPE (sym)) == code)
                  && STREQ (DEPRECATED_SYMBOL_NAME (sym), type_name))
                {
@@ -3000,7 +2993,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
   struct next_fnfieldlist *new_fnlist;
   struct next_fnfield *new_sublist;
   char *main_fn_name;
-  register char *p;
+  char *p;
 
   /* Process each list until we find something that is not a member function
      or find the end of the functions. */
@@ -3461,7 +3454,7 @@ static int
 read_cpp_abbrev (struct field_info *fip, char **pp, struct type *type,
                 struct objfile *objfile)
 {
-  register char *p;
+  char *p;
   char *name;
   char cpp_abbrev;
   struct type *context;
@@ -3723,7 +3716,7 @@ static int
 read_struct_fields (struct field_info *fip, char **pp, struct type *type,
                    struct objfile *objfile)
 {
-  register char *p;
+  char *p;
   struct nextfield *new;
 
   /* We better set p right now, in case there are no fields at all...    */
@@ -3944,7 +3937,7 @@ static int
 read_tilde_fields (struct field_info *fip, char **pp, struct type *type,
                   struct objfile *objfile)
 {
-  register char *p;
+  char *p;
 
   STABS_CONTINUE (pp, objfile);
 
@@ -4023,9 +4016,9 @@ read_tilde_fields (struct field_info *fip, char **pp, struct type *type,
 }
 
 static int
-attach_fn_fields_to_type (struct field_info *fip, register struct type *type)
+attach_fn_fields_to_type (struct field_info *fip, struct type *type)
 {
-  register int n;
+  int n;
 
   for (n = TYPE_NFN_FIELDS (type);
        fip->fnlist != NULL;
@@ -4068,7 +4061,7 @@ attach_fn_fields_to_type (struct field_info *fip, register struct type *type)
 // OBSOLETE    STABS_CONTINUE (pp, objfile);   /* handle \\ */
 // OBSOLETE    while (**pp != ';' && (sname = get_substring (pp, ' '), sname))
 // OBSOLETE      {
-// OBSOLETE        ref_static = lookup_symbol (sname, 0, VAR_NAMESPACE, 0, 0); /*demangled_name */
+// OBSOLETE        ref_static = lookup_symbol (sname, 0, VAR_DOMAIN, 0, 0);    /*demangled_name */
 // OBSOLETE        if (!ref_static)
 // OBSOLETE    {
 // OBSOLETE      complaint (&symfile_complaints,
@@ -4174,12 +4167,12 @@ attach_fn_fields_to_type (struct field_info *fip, register struct type *type)
    for this class's virtual functions.  */
 
 static int
-attach_fields_to_type (struct field_info *fip, register struct type *type,
+attach_fields_to_type (struct field_info *fip, struct type *type,
                       struct objfile *objfile)
 {
-  register int nfields = 0;
-  register int non_public_fields = 0;
-  register struct nextfield *scan;
+  int nfields = 0;
+  int non_public_fields = 0;
+  struct nextfield *scan;
 
   /* Count up the number of fields that we have, as well as taking note of
      whether or not there are any non-public fields, which requires us to
@@ -4378,7 +4371,7 @@ read_struct_type (char **pp, struct type *type, enum type_code type_code,
    array.  */
 
 static struct type *
-read_array_type (register char **pp, register struct type *type,
+read_array_type (char **pp, struct type *type,
                 struct objfile *objfile)
 {
   struct type *index_type, *element_type, *range_type;
@@ -4441,13 +4434,13 @@ read_array_type (register char **pp, register struct type *type,
    Also defines the symbols that represent the values of the type.  */
 
 static struct type *
-read_enum_type (register char **pp, register struct type *type,
+read_enum_type (char **pp, struct type *type,
                struct objfile *objfile)
 {
-  register char *p;
+  char *p;
   char *name;
-  register long n;
-  register struct symbol *sym;
+  long n;
+  struct symbol *sym;
   int nsyms = 0;
   struct pending **symlist;
   struct pending *osyms, *syms;
@@ -4500,7 +4493,7 @@ read_enum_type (register char **pp, register struct type *type,
       DEPRECATED_SYMBOL_NAME (sym) = name;
       SYMBOL_LANGUAGE (sym) = current_subfile->language;
       SYMBOL_CLASS (sym) = LOC_CONST;
-      SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       SYMBOL_VALUE (sym) = n;
       if (n < 0)
        unsigned_enum = 0;
@@ -5115,7 +5108,7 @@ fix_common_block (struct symbol *sym, int valu)
   struct pending *next = (struct pending *) SYMBOL_TYPE (sym);
   for (; next; next = next->next)
     {
-      register int j;
+      int j;
       for (j = next->nsyms - 1; j >= 0; j--)
        SYMBOL_VALUE_ADDRESS (next->symbol[j]) += valu;
     }
@@ -5128,7 +5121,7 @@ fix_common_block (struct symbol *sym, int valu)
 /* Add a type to the list of undefined types to be checked through
    once this file has been read in.  */
 
-void
+static void
 add_undefined_type (struct type *type)
 {
   if (undef_types_length == undef_types_allocated)
@@ -5187,7 +5180,7 @@ cleanup_undefined_types (void)
                        struct symbol *sym = ppt->symbol[i];
 
                        if (SYMBOL_CLASS (sym) == LOC_TYPEDEF
-                           && SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE
+                           && SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
                            && (TYPE_CODE (SYMBOL_TYPE (sym)) ==
                                TYPE_CODE (*type))
                            && STREQ (DEPRECATED_SYMBOL_NAME (sym), typename))
This page took 0.030986 seconds and 4 git commands to generate.