Remove EXTERN from buildsym.h
[deliverable/binutils-gdb.git] / gdb / buildsym.h
index 191db8ca4fadb7b972eed0d165090ab929b40f5f..220d7f48fe495473c57ddb4ab675ff6a58f4ab64 100644 (file)
@@ -30,25 +30,13 @@ enum language;
    file-reading routines.
 
    They originated in dbxread.c of gdb-4.2, and were split out to
-   make xcoffread.c more maintainable by sharing code.
-
-   Variables declared in this file can be defined by #define-ing the
-   name EXTERN to null.  It is used to declare variables that are
-   normally extern, but which get defined in a single module using
-   this technique.  */
+   make xcoffread.c more maintainable by sharing code.  */
 
 struct block;
 struct pending_block;
 
 struct dynamic_prop;
 
-#ifndef EXTERN
-#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.  */
@@ -67,17 +55,6 @@ struct subfile
   struct symtab *symtab;
 };
 
-EXTERN struct subfile *current_subfile;
-
-/* Global variable which, when set, indicates that we are processing a
-   .o file compiled with gcc */
-
-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.  */
@@ -91,28 +68,6 @@ struct pending
     struct symbol *symbol[PENDINGSIZE];
   };
 
-/* Here are the three lists that symbols are put on.  */
-
-/* static at top level, and types */
-
-EXTERN struct pending *file_symbols;
-
-/* global functions and variables */
-
-EXTERN struct pending *global_symbols;
-
-/* everything local to lexical context */
-
-EXTERN struct pending *local_symbols;
-
-/* "using" directives local to lexical context.  */
-
-EXTERN struct using_direct *local_using_directives;
-
-/* global "using" directives.  */
-
-EXTERN struct using_direct *global_using_directives;
-
 /* Stack representing unclosed lexical contexts (that will become
    blocks, eventually).  */
 
@@ -153,32 +108,12 @@ struct context_stack
 
   };
 
-EXTERN struct context_stack *context_stack;
-
-/* Index of first unused entry in context stack.  */
-
-EXTERN int context_stack_depth;
-
-/* Non-zero if the context stack is empty.  */
-#define outermost_context_p() (context_stack_depth == 0)
-
-/* Nonzero if within a function (so symbols should be local, if
-   nothing says specifically).  */
-
-EXTERN int within_function;
-
 /* The type of the record_line function.  */
 typedef void (record_line_ftype) (struct subfile *subfile, int line,
                                  CORE_ADDR pc);
 
 \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);
 
@@ -186,7 +121,6 @@ extern struct symbol *find_symbol_in_list (struct pending *list,
                                           char *name, int length);
 
 extern struct block *finish_block (struct symbol *symbol,
-                                  struct pending **listhead,
                                   struct pending_block *old_blocks,
                                   const struct dynamic_prop *static_link,
                                   CORE_ADDR start,
@@ -209,9 +143,9 @@ extern void start_subfile (const char *name);
 
 extern void patch_subfile_names (struct subfile *subfile, const char *name);
 
-extern void push_subfile (void);
+extern void push_subfile ();
 
-extern char *pop_subfile (void);
+extern const char *pop_subfile ();
 
 extern struct block *end_symtab_get_static_block (CORE_ADDR end_addr,
                                                  int expandable,
@@ -228,17 +162,9 @@ extern struct compunit_symtab *end_expandable_symtab (CORE_ADDR end_addr,
 
 extern void augment_type_symtab (void);
 
-/* Defined in stabsread.c.  */
-
-extern void scan_file_globals (struct objfile *objfile);
-
-extern void buildsym_new_init (void);
-
-extern void buildsym_init (void);
-
 extern struct context_stack *push_context (int desc, CORE_ADDR valu);
 
-extern struct context_stack *pop_context (void);
+extern struct context_stack pop_context ();
 
 extern record_line_ftype record_line;
 
@@ -251,10 +177,6 @@ extern struct compunit_symtab *start_symtab (struct objfile *objfile,
 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
    table.  FORMAT must be a string with a lifetime at least as long as
    the symtab's objfile.  */
@@ -267,9 +189,6 @@ extern void record_debugformat (const char *format);
 
 extern void record_producer (const char *producer);
 
-extern void merge_symbol_lists (struct pending **srclist,
-                               struct pending **targetlist);
-
 /* Set the name of the last source file.  NAME is copied by this
    function.  */
 
@@ -302,6 +221,45 @@ extern void set_last_source_start_addr (CORE_ADDR addr);
 
 extern CORE_ADDR get_last_source_start_addr ();
 
-#undef EXTERN
+/* Return the local using directives.  */
+
+extern struct using_direct **get_local_using_directives ();
+
+/* Set the list of local using directives.  */
+
+extern void set_local_using_directives (struct using_direct *new_local);
+
+/* Return the global using directives.  */
+
+extern struct using_direct **get_global_using_directives ();
+
+/* True if the context stack is empty.  */
+
+extern bool outermost_context_p ();
+
+/* Return the top of the context stack, or nullptr if there is an
+   entry.  */
+
+extern struct context_stack *get_current_context_stack ();
+
+/* Return the context stack depth.  */
+
+extern int get_context_stack_depth ();
+
+/* Return the current subfile.  */
+
+extern struct subfile *get_current_subfile ();
+
+/* Return the local symbol list.  */
+
+extern struct pending **get_local_symbols ();
+
+/* Return the file symbol list.  */
+
+extern struct pending **get_file_symbols ();
+
+/* Return the global symbol list.  */
+
+extern struct pending **get_global_symbols ();
 
 #endif /* defined (BUILDSYM_H) */
This page took 0.026648 seconds and 4 git commands to generate.