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. */
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. */
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). */
};
-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);
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,
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,
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;
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. */
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. */
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) */