aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2015-08-15 16:46:20 -0700
committerDoug Evans <xdje42@gmail.com>2015-08-15 16:46:20 -0700
commit8763cedeec7f0a1daea41c2231bda165652e273b (patch)
tree9ae1bd73d9b1b1883e2664e8e38603d6dcbdbd7f /gdb/psymtab.c
parent51cdc99310171d6c53d2d00103a0ce34374d0b9b (diff)
downloadfsf-binutils-gdb-8763cedeec7f0a1daea41c2231bda165652e273b.zip
fsf-binutils-gdb-8763cedeec7f0a1daea41c2231bda165652e273b.tar.gz
fsf-binutils-gdb-8763cedeec7f0a1daea41c2231bda165652e273b.tar.bz2
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.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c17
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