-struct context_stack *
-pop_context (void)
-{
- gdb_assert (context_stack_depth > 0);
- return (&context_stack[--context_stack_depth]);
-}
-
-\f
-
-/* Compute a small integer hash code for the given name. */
-
-int
-hashname (const char *name)
-{
- return (hash(name,strlen(name)) % HASHSIZE);
-}
-\f
-
-void
-record_debugformat (const char *format)
-{
- current_subfile->debugformat = format;
-}
-
-void
-record_producer (const char *producer)
-{
- current_subfile->producer = producer;
-}
-
-/* Merge the first symbol list SRCLIST into the second symbol list
- TARGETLIST by repeated calls to add_symbol_to_list(). This
- procedure "frees" each link of SRCLIST by adding it to the
- free_pendings list. Caller must set SRCLIST to a null list after
- calling this function.
-
- Void return. */
-
-void
-merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
-{
- int i;
-
- if (!srclist || !*srclist)
- return;
-
- /* Merge in elements from current link. */
- for (i = 0; i < (*srclist)->nsyms; i++)
- add_symbol_to_list ((*srclist)->symbol[i], targetlist);
-
- /* Recurse on next. */
- merge_symbol_lists (&(*srclist)->next, targetlist);
-
- /* "Free" the current link. */
- (*srclist)->next = free_pendings;
- free_pendings = (*srclist);
-}
-\f
-
-/* Name of source file whose symbol data we are now processing. This
- comes from a symbol of type N_SO for stabs. For Dwarf it comes
- from the DW_AT_name attribute of a DW_TAG_compile_unit DIE. */
-
-static char *last_source_file;
-
-/* See buildsym.h. */
-
-void
-set_last_source_file (const char *name)
-{
- xfree (last_source_file);
- last_source_file = name == NULL ? NULL : xstrdup (name);
-}
-
-/* See buildsym.h. */
-
-const char *
-get_last_source_file (void)
-{
- return last_source_file;
-}
-
-\f
-
-/* Initialize anything that needs initializing when starting to read a
- fresh piece of a symbol file, e.g. reading in the stuff
- corresponding to a psymtab. */
-
-void
-buildsym_init (void)
-{
- free_pendings = NULL;
- file_symbols = NULL;
- global_symbols = NULL;
- pending_blocks = NULL;
- pending_macros = NULL;
- using_directives = NULL;
- subfile_stack = NULL;
-
- /* We shouldn't have any address map at this point. */
- gdb_assert (! pending_addrmap);
- pending_addrmap_interesting = 0;
-}
-
-/* Initialize anything that needs initializing when a completely new
- symbol file is specified (not just adding some symbols from another
- file, e.g. a shared library). */
-
-void
-buildsym_new_init (void)