2018-07-16 Tom Tromey <tom@tromey.com>
+ * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
+ (next_symbol_text_func): Move from buildsym.h.
+ * stabsread.c (hashname): Move from buildsym.c.
+ * buildsym.h (HASHSIZE, symnum, next_symbol_text)
+ (next_symbol_text_func, hashname): Move to stabsread.h.
+ * buildsym.c: Don't include bcache.h
+ (hashname): Move to stasbread.c.
+
+2018-07-16 Tom Tromey <tom@tromey.com>
+
* buildsym.h (context_stack_size): Don't declare.
* buildsym.c (context_stack_size): New global.
#include "gdbtypes.h"
#include "complaints.h"
#include "expression.h" /* For "enum exp_opcode" used by... */
-#include "bcache.h"
#include "filenames.h" /* For DOSish file names. */
#include "macrotab.h"
#include "demangle.h" /* Needed by SYMBOL_INIT_DEMANGLED_NAME. */
\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)
{
#define EXTERN extern
#endif
-#define HASHSIZE 127 /* Size of things hashed via
- hashname(). */
-
/* The list of sub-source-files within the current individual
compilation. Each file gets its own symtab with its own linetable
and associated info, but they all share one blockvector. */
EXTERN unsigned char processing_gcc_compilation;
-/* Count symbols as they are processed, for error messages. */
-
-EXTERN unsigned int symnum;
-
/* Record the symbols defined for each context in a list. We don't
create a struct block for the context until we know how long to
make it. */
\f
-#define next_symbol_text(objfile) (*next_symbol_text_func)(objfile)
-
-/* Function to invoke get the next symbol. Return the symbol name. */
-
-EXTERN const char *(*next_symbol_text_func) (struct objfile *);
-
extern void add_symbol_to_list (struct symbol *symbol,
struct pending **listhead);
extern void restart_symtab (struct compunit_symtab *cust,
const char *name, CORE_ADDR start_addr);
-extern int hashname (const char *name);
-
extern void free_pending_blocks (void);
/* Record the name of the debug format in the current pending symbol
#include "target-float.h"
#include "cp-abi.h"
#include "cp-support.h"
+#include "bcache.h"
#include <ctype.h>
/* Ask stabsread.h to define the vars it normally declares `extern'. */
}
}
+/* See stabsread.h. */
+
+int
+hashname (const char *name)
+{
+ return hash (name, strlen (name)) % HASHSIZE;
+}
+
/* Initializer for this module. */
void
#define EXTERN extern
#endif
+#define HASHSIZE 127 /* Size of things hashed via
+ hashname(). */
+
+/* Compute a small integer hash code for the given name. */
+
+extern int hashname (const char *name);
+
+/* Count symbols as they are processed, for error messages. */
+
+EXTERN unsigned int symnum;
+
+#define next_symbol_text(objfile) (*next_symbol_text_func)(objfile)
+
+/* Function to invoke get the next symbol. Return the symbol name. */
+
+EXTERN const char *(*next_symbol_text_func) (struct objfile *);
+
/* Hash table of global symbols whose values are not known yet.
They are chained thru the SYMBOL_VALUE_CHAIN, since we don't
have the correct data for that slot yet.