From fc474241b7996b9ebdd4f83f52692096637c5620 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 20 Aug 2013 18:57:00 +0000 Subject: * buildsym.c (subfile_stack): Move here from buildsym.h. (pending_macros): Ditto. (get_macro_table): New function. (buildsym_init): Initialize subfile_stack. * coffread.c (type_vector,type_vector_length): Moved here from buildsym.h. (INITIAL_TYPE_VECTOR_LENGTH): Ditto. (coff_symtab_read): Use it. * dbxread.c (read_ofile_symtab): Delete init of subfile_stack. * dwarf2read.c (macro_start_file): Replace uses of pending_macros with call to get_macro_table. * stabsread.c (type_vector,type_vector_length): Moved here from buildsym.h. (INITIAL_TYPE_VECTOR_LENGTH): Ditto. * buildsym.h (get_macro_table): Declare. --- gdb/stabsread.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gdb/stabsread.c') diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 875541c..f16e547 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -207,6 +207,23 @@ static int noname_undefs_length; if (**(pp) == '\\' || (**(pp) == '?' && (*(pp))[1] == '\0')) \ *(pp) = next_symbol_text (objfile); \ } while (0) + +/* Vector of types defined so far, indexed by their type numbers. + (In newer sun systems, dbx uses a pair of numbers in parens, + as in "(SUBFILENUM,NUMWITHINSUBFILE)". + Then these numbers must be translated through the type_translations + hash table to get the index into the type vector.) */ + +static struct type **type_vector; + +/* Number of elements allocated for type_vector currently. */ + +static int type_vector_length; + +/* Initial size of type vector. Is realloc'd larger if needed, and + realloc'd down to the size actually used, when completed. */ + +#define INITIAL_TYPE_VECTOR_LENGTH 160 /* Look up a dbx type-number pair. Return the address of the slot -- cgit v1.1