/* Build symbol tables in GDB's internal format.
- Copyright (C) 1986-1993, 1995-2000, 2002-2003, 2007-2012 Free
- Software Foundation, Inc.
+ Copyright (C) 1986-2013 Free Software Foundation, Inc.
This file is part of GDB.
this technique. */
struct block;
+struct pending_block;
#ifndef EXTERN
#define EXTERN extern
#define HASHSIZE 127 /* Size of things hashed via
hashname(). */
-/* Name of source file whose symbol data we are now processing. This
- comes from a symbol of type N_SO for stabs. For Dwarf it comes
- from the DW_AT_name attribute of a DW_TAG_compile_unit DIE. */
-
-EXTERN char *last_source_file;
-
/* Core address of start of text of current source file. This too
comes from the N_SO symbol. For Dwarf it typically comes from the
DW_AT_low_pc attribute of a DW_TAG_compile_unit DIE. */
EXTERN struct pending *local_symbols;
-/* func params local to lexical context */
-
-EXTERN struct pending *param_symbols;
-
/* "using" directives local to lexical context. */
EXTERN struct using_direct *using_directives;
struct pending *locals;
- /* Pending func params at the time we entered */
-
- struct pending *params;
-
/* Pending using directives at the time we entered. */
struct using_direct *using_directives;
EXTERN int within_function;
-/* List of blocks already made (lexical contexts already closed).
- This is used at the end to make the blockvector. */
-
-struct pending_block
- {
- struct pending_block *next;
- struct block *block;
- };
-
-/* Pointer to the head of a linked list of symbol blocks which have
- already been finalized (lexical contexts already closed) and which
- are just waiting to be built into a blockvector when finalizing the
- associated symtab. */
-
-EXTERN struct pending_block *pending_blocks;
\f
struct subfile_stack
#define INITIAL_TYPE_VECTOR_LENGTH 160
-extern void add_free_pendings (struct pending *list);
-
extern void add_symbol_to_list (struct symbol *symbol,
struct pending **listhead);
extern char *pop_subfile (void);
+extern struct block *end_symtab_get_static_block (CORE_ADDR end_addr,
+ struct objfile *objfile,
+ int expandable,
+ int required);
+
+extern struct symtab *end_symtab_from_static_block (struct block *static_block,
+ struct objfile *objfile,
+ int section,
+ int expandable);
+
extern struct symtab *end_symtab (CORE_ADDR end_addr,
struct objfile *objfile, int section);
+extern struct symtab *end_expandable_symtab (CORE_ADDR end_addr,
+ struct objfile *objfile,
+ int section);
+
+extern void augment_type_symtab (struct objfile *objfile,
+ struct symtab *primary_symtab);
+
/* Defined in stabsread.c. */
extern void scan_file_globals (struct objfile *objfile);
extern void record_line (struct subfile *subfile, int line, CORE_ADDR pc);
-extern void start_symtab (char *name, char *dirname, CORE_ADDR start_addr);
+extern void start_symtab (const char *name, const char *dirname,
+ CORE_ADDR start_addr);
+
+extern void restart_symtab (CORE_ADDR start_addr);
extern int hashname (const char *name);
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 void set_last_source_file (const char *name);
+
+/* Fetch the name of the last source file. */
+
+extern const char *get_last_source_file (void);
+
/* The macro table for the compilation unit whose symbols we're
currently reading. All the symtabs for this CU will point to
this. */