Simplify calls to init_psymbol_list
[deliverable/binutils-gdb.git] / gdb / dbxread.c
index 21a29273f26fb2fd238ce4ab3e2b94a3b88b214c..6149175d732d42c5dfd35fc476a7e88c60833bd2 100644 (file)
@@ -536,9 +536,7 @@ dbx_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
     perror_with_name (objfile_name (objfile));
 
   /* Size the symbol table.  */
-  if (objfile->global_psymbols.capacity () == 0
-      && objfile->static_psymbols.capacity () == 0)
-    init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
+  init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
 
   symbol_size = DBX_SYMBOL_SIZE (objfile);
   symbol_table_offset = DBX_SYMTAB_OFFSET (objfile);
@@ -1476,7 +1474,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
              add_psymbol_to_list (sym_name, sym_len, 1,
                                   VAR_DOMAIN, LOC_STATIC,
                                   data_sect_index,
-                                  &objfile->static_psymbols,
+                                  psymbol_placement::STATIC,
                                   nlist.n_value, psymtab_language, objfile);
              continue;
 
@@ -1486,7 +1484,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
              add_psymbol_to_list (sym_name, sym_len, 1,
                                   VAR_DOMAIN, LOC_STATIC,
                                   data_sect_index,
-                                  &objfile->global_psymbols,
+                                  psymbol_placement::GLOBAL,
                                   nlist.n_value, psymtab_language, objfile);
              continue;
 
@@ -1503,14 +1501,14 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
                {
                  add_psymbol_to_list (sym_name, sym_len, 1,
                                       STRUCT_DOMAIN, LOC_TYPEDEF, -1,
-                                      &objfile->static_psymbols,
+                                      psymbol_placement::STATIC,
                                       0, psymtab_language, objfile);
                  if (p[2] == 't')
                    {
                      /* Also a typedef with the same name.  */
                      add_psymbol_to_list (sym_name, sym_len, 1,
                                           VAR_DOMAIN, LOC_TYPEDEF, -1,
-                                          &objfile->static_psymbols,
+                                          psymbol_placement::STATIC,
                                           0, psymtab_language, objfile);
                      p += 1;
                    }
@@ -1522,7 +1520,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
                {
                  add_psymbol_to_list (sym_name, sym_len, 1,
                                       VAR_DOMAIN, LOC_TYPEDEF, -1,
-                                      &objfile->static_psymbols,
+                                      psymbol_placement::STATIC,
                                       0, psymtab_language, objfile);
                }
            check_enum:
@@ -1583,7 +1581,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
                         enum constants in psymtabs, just in symtabs.  */
                      add_psymbol_to_list (p, q - p, 1,
                                           VAR_DOMAIN, LOC_CONST, -1,
-                                          &objfile->static_psymbols, 0,
+                                          psymbol_placement::STATIC, 0,
                                           psymtab_language, objfile);
                      /* Point past the name.  */
                      p = q;
@@ -1601,7 +1599,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
              /* Constant, e.g. from "const" in Pascal.  */
              add_psymbol_to_list (sym_name, sym_len, 1,
                                   VAR_DOMAIN, LOC_CONST, -1,
-                                  &objfile->static_psymbols, 0,
+                                  psymbol_placement::STATIC, 0,
                                   psymtab_language, objfile);
              continue;
 
@@ -1657,7 +1655,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
              add_psymbol_to_list (sym_name, sym_len, 1,
                                   VAR_DOMAIN, LOC_BLOCK,
                                   SECT_OFF_TEXT (objfile),
-                                  &objfile->static_psymbols,
+                                  psymbol_placement::STATIC,
                                   nlist.n_value, psymtab_language, objfile);
              continue;
 
@@ -1716,7 +1714,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
              add_psymbol_to_list (sym_name, sym_len, 1,
                                   VAR_DOMAIN, LOC_BLOCK,
                                   SECT_OFF_TEXT (objfile),
-                                  &objfile->global_psymbols,
+                                  psymbol_placement::GLOBAL,
                                   nlist.n_value, psymtab_language, objfile);
              continue;
 
This page took 0.024915 seconds and 4 git commands to generate.