X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fxcoffread.c;h=50da0789755289943ac5696dbd45bf0377b0fcbf;hb=6eee24ce30f8e95335c2ad8586f9a64398eb2cd4;hp=acf095959f0f4a161826b1da6413d437dac935e0;hpb=b971899198607b844f5a37e39dc561766c3b331a;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index acf095959f..50da078975 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1,5 +1,5 @@ /* Read AIX xcoff symbol tables and convert to internal format, for GDB. - Copyright (C) 1986-2018 Free Software Foundation, Inc. + Copyright (C) 1986-2019 Free Software Foundation, Inc. Derived from coffread.c, dbxread.c, and a lot of hacking. Contributed by IBM Corporation. @@ -2026,16 +2026,13 @@ static unsigned int first_fun_line_offset; static struct partial_symtab * xcoff_start_psymtab (struct objfile *objfile, - const char *filename, int first_symnum, - std::vector &global_psymbols, - std::vector &static_psymbols) + const char *filename, int first_symnum) { struct partial_symtab *result = start_psymtab_common (objfile, filename, /* We fill in textlow later. */ - 0, - global_psymbols, static_psymbols); + 0); result->read_symtab_private = XOBNEW (&objfile->objfile_obstack, struct symloc); @@ -2103,13 +2100,6 @@ xcoff_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 = NULL; subpst->read_symtab = pst->read_symtab; } @@ -2324,9 +2314,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, pst = xcoff_start_psymtab (objfile, filestring, - symnum_before, - objfile->global_psymbols, - objfile->static_psymbols); + symnum_before); } } /* Activate the misc_func_recorded mechanism for @@ -2508,9 +2496,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, pst = xcoff_start_psymtab (objfile, filestring, - symnum_before, - objfile->global_psymbols, - objfile->static_psymbols); + symnum_before); last_csect_name = NULL; } break; @@ -2668,7 +2654,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, add_psymbol_to_list (namestring, p - namestring, 1, VAR_DOMAIN, LOC_STATIC, SECT_OFF_DATA (objfile), - &objfile->static_psymbols, + psymbol_placement::STATIC, symbol.n_value, psymtab_language, objfile); continue; @@ -2679,7 +2665,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, add_psymbol_to_list (namestring, p - namestring, 1, VAR_DOMAIN, LOC_STATIC, SECT_OFF_DATA (objfile), - &objfile->global_psymbols, + psymbol_placement::GLOBAL, symbol.n_value, psymtab_language, objfile); continue; @@ -2697,14 +2683,14 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, { add_psymbol_to_list (namestring, p - namestring, 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 (namestring, p - namestring, 1, VAR_DOMAIN, LOC_TYPEDEF, -1, - &objfile->static_psymbols, + psymbol_placement::STATIC, 0, psymtab_language, objfile); p += 1; } @@ -2716,7 +2702,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, { add_psymbol_to_list (namestring, p - namestring, 1, VAR_DOMAIN, LOC_TYPEDEF, -1, - &objfile->static_psymbols, + psymbol_placement::STATIC, 0, psymtab_language, objfile); } check_enum: @@ -2778,7 +2764,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, enum constants in psymtabs, just in symtabs. */ add_psymbol_to_list (p, q - p, 1, VAR_DOMAIN, LOC_CONST, -1, - &objfile->static_psymbols, + psymbol_placement::STATIC, 0, psymtab_language, objfile); /* Point past the name. */ p = q; @@ -2796,7 +2782,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, /* Constant, e.g. from "const" in Pascal. */ add_psymbol_to_list (namestring, p - namestring, 1, VAR_DOMAIN, LOC_CONST, -1, - &objfile->static_psymbols, + psymbol_placement::STATIC, 0, psymtab_language, objfile); continue; @@ -2814,7 +2800,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, add_psymbol_to_list (namestring, p - namestring, 1, VAR_DOMAIN, LOC_BLOCK, SECT_OFF_TEXT (objfile), - &objfile->static_psymbols, + psymbol_placement::STATIC, symbol.n_value, psymtab_language, objfile); continue; @@ -2844,7 +2830,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader, add_psymbol_to_list (namestring, p - namestring, 1, VAR_DOMAIN, LOC_BLOCK, SECT_OFF_TEXT (objfile), - &objfile->global_psymbols, + psymbol_placement::GLOBAL, symbol.n_value, psymtab_language, objfile); continue; @@ -3005,14 +2991,11 @@ xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags) if (val != size) perror_with_name (_("reading symbol table")); - /* If we are reinitializing, or if we have never loaded syms yet, init. */ - if (objfile->global_psymbols.capacity () == 0 - && objfile->static_psymbols.capacity () == 0) - /* I'm not sure how how good num_symbols is; the rule of thumb in - init_psymbol_list was developed for a.out. On the one hand, - num_symbols includes auxents. On the other hand, it doesn't - include N_SLINE. */ - init_psymbol_list (objfile, num_symbols); + /* I'm not sure how how good num_symbols is; the rule of thumb in + init_psymbol_list was developed for a.out. On the one hand, + num_symbols includes auxents. On the other hand, it doesn't + include N_SLINE. */ + init_psymbol_list (objfile, num_symbols); scoped_free_pendings free_pending; minimal_symbol_reader reader (objfile);