questionable--see comment where we call them). */
#include "stabsread.h"
-/* Pointer to the head of a linked list of symbol blocks which have
- already been finalized (lexical contexts already closed) and which are
- just waiting to be built into a blockvector when finalizing the
- associated symtab. */
-
-static struct pending_block *pending_blocks = NULL;
-
/* List of free `struct pending' structures for reuse. */
static struct pending *free_pendings;
BLOCK_END (block) = end;
/* Superblock filled in when containing block is made */
BLOCK_SUPERBLOCK (block) = NULL;
+
BLOCK_GCC_COMPILED (block) = processing_gcc_compilation;
/* Put the block in as the value of the symbol that names it. */
case LOC_UNDEF:
case LOC_CONST:
case LOC_STATIC:
+ case LOC_INDIRECT:
case LOC_REGISTER:
case LOC_LOCAL:
case LOC_TYPEDEF:
case LOC_UNDEF:
case LOC_CONST:
case LOC_STATIC:
+ case LOC_INDIRECT:
case LOC_REGISTER:
case LOC_LOCAL:
case LOC_TYPEDEF:
blockvector = make_blockvector (objfile);
}
-#ifdef PROCESS_LINENUMBER_HOOK
- PROCESS_LINENUMBER_HOOK (); /* Needed for xcoff. */
+#ifndef PROCESS_LINENUMBER_HOOK
+#define PROCESS_LINENUMBER_HOOK()
#endif
+ PROCESS_LINENUMBER_HOOK (); /* Needed for xcoff. */
/* Now create the symtab objects proper, one for each subfile. */
/* (The main file is the last one on the chain.) */
new = &context_stack[context_stack_depth++];
new->depth = desc;
new->locals = local_symbols;
+ new->params = param_symbols;
new->old_blocks = pending_blocks;
new->start_addr = valu;
new->name = NULL;
local_symbols = NULL;
+ param_symbols = NULL;
return (new);
}
current_subfile -> debugformat = savestring (format, strlen (format));
}
+
+/* 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 (srclist, targetlist)
+ struct pending ** srclist;
+ struct pending ** targetlist;
+{
+ register int i;
+ register struct pending * link;
+
+ 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
/* Initialize anything that needs initializing when starting to read
a fresh piece of a symbol file, e.g. reading in the stuff corresponding