/* Support routines for decoding "stabs" debugging information format.
- Copyright (C) 1986-2013 Free Software Foundation, Inc.
+ Copyright (C) 1986-2014 Free Software Foundation, Inc.
This file is part of GDB.
Avoid placing any object file format specific code in this file. */
#include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
#include "bfd.h"
#include "gdb_obstack.h"
#include "symtab.h"
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
\f
/* Look up a dbx type-number pair. Return the address of the slot
TYPE_LENGTH (type) = read_huge_number (pp, 0, &nbits, 0);
if (nbits != 0)
- return error_type (pp, objfile);
+ {
+ do_cleanups (back_to);
+ return error_type (pp, objfile);
+ }
set_length_in_type_chain (type);
}
complaint (&symfile_complaints,
_("%s: common block `%s' from "
"global_sym_chain unresolved"),
- objfile->name, SYMBOL_PRINT_NAME (prev));
+ objfile_name (objfile), SYMBOL_PRINT_NAME (prev));
}
}
memset (global_sym_chain, 0, sizeof (global_sym_chain));