X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fdbxread.c;h=6149175d732d42c5dfd35fc476a7e88c60833bd2;hb=6eee24ce30f8e95335c2ad8586f9a64398eb2cd4;hp=e3a952022cceb24b3a79235490ad4b4db54f6fcb;hpb=b22a7c6ab6173fe4fa1352e14d00a234bbf50346;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/dbxread.c b/gdb/dbxread.c index e3a952022c..6149175d73 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -298,9 +298,7 @@ static void add_old_header_file (const char *, int); static void add_this_object_header_file (int); static struct partial_symtab *start_psymtab (struct objfile *, const char *, - CORE_ADDR, int, - std::vector &, - std::vector &); + CORE_ADDR, int); /* Free up old header file tables. */ @@ -538,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); @@ -1302,9 +1298,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile) { pst = start_psymtab (objfile, namestring, valu, - first_so_symnum * symbol_size, - objfile->global_psymbols, - objfile->static_psymbols); + first_so_symnum * symbol_size); pst->dirname = dirname_nso; dirname_nso = NULL; } @@ -1480,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; @@ -1490,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; @@ -1507,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; } @@ -1526,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: @@ -1587,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; @@ -1605,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; @@ -1661,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; @@ -1720,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; @@ -1916,12 +1910,10 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile) static struct partial_symtab * start_psymtab (struct objfile *objfile, const char *filename, CORE_ADDR textlow, - int ldsymoff, std::vector &global_psymbols, - std::vector &static_psymbols) + int ldsymoff) { struct partial_symtab *result = - start_psymtab_common (objfile, filename, textlow, - global_psymbols, static_psymbols); + start_psymtab_common (objfile, filename, textlow); result->read_symtab_private = XOBNEW (&objfile->objfile_obstack, struct symloc); @@ -2057,13 +2049,6 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst, subpst->dependencies[0] = pst; subpst->number_of_dependencies = 1; - subpst->globals_offset = - subpst->n_global_syms = - subpst->statics_offset = - subpst->n_static_syms = 0; - - subpst->readin = 0; - subpst->compunit_symtab = 0; subpst->read_symtab = pst->read_symtab; }