Add end_psymtab_common, have all debug info readers call it.

gdb/ChangeLog:

	* dbxread.c (dbx_end_psymtab): Renamed from end_psymtab.  All callers
	updated.  Call end_psymtab_common.
	* dwarf2read.c (process_psymtab_comp_unit_reader): Call
	end_psymtab_common.
	(build_type_psymtabs_reader): Ditto.
	* psympriv.h (sort_pst_symbols): Delete.
	(end_psymtab_common): Declare.
	* psymtab.c (sort_pst_symbols): Make static.
	(end_psymtab_common): New function.
	* xcoffread.c (xcoff_end_psymtab): Call end_psymtab_common.
This commit is contained in:
Doug Evans
2015-08-15 16:46:20 -07:00
parent 51cdc99310
commit 8763cedeec
9 changed files with 82 additions and 72 deletions

View File

@@ -1496,7 +1496,7 @@ compare_psymbols (const void *s1p, const void *s2p)
SYMBOL_SEARCH_NAME (*s2));
}
void
static void
sort_pst_symbols (struct objfile *objfile, struct partial_symtab *pst)
{
/* Sort the global list; don't sort the static list. */
@@ -1527,6 +1527,21 @@ start_psymtab_common (struct objfile *objfile,
return psymtab;
}
/* Perform "finishing up" operations of a partial symtab. */
void
end_psymtab_common (struct objfile *objfile, struct partial_symtab *pst)
{
pst->n_global_syms
= objfile->global_psymbols.next - (objfile->global_psymbols.list
+ pst->globals_offset);
pst->n_static_syms
= objfile->static_psymbols.next - (objfile->static_psymbols.list
+ pst->statics_offset);
sort_pst_symbols (objfile, pst);
}
/* Calculate a hash code for the given partial symbol. The hash is
calculated using the symbol's value, language, domain, class
and name. These are the values which are set by