diff options
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r-- | gdb/psymtab.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 9124b55..5d0aa1c 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -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 |