replace XMALLOC with XNEW
[deliverable/binutils-gdb.git] / gdb / buildsym.h
index 0db96bf2f96878171796f7f401acf2911e648531..57467c7ed463d3d4d4d727ca036760b6ecad72af 100644 (file)
@@ -1,6 +1,5 @@
 /* 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-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,6 +36,7 @@ struct addrmap;
    this technique.  */
 
 struct block;
+struct pending_block;
 
 #ifndef EXTERN
 #define        EXTERN extern
@@ -45,12 +45,6 @@ struct block;
 #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.  */
@@ -177,54 +171,14 @@ EXTERN int context_stack_size;
 
 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
-  {
-    struct subfile_stack *next;
-    char *name;
-  };
-
-EXTERN struct subfile_stack *subfile_stack;
-
 #define next_symbol_text(objfile) (*next_symbol_text_func)(objfile)
 
 /* Function to invoke get the next symbol.  Return the symbol name.  */
 
 EXTERN char *(*next_symbol_text_func) (struct objfile *);
 
-/* Vector of types defined so far, indexed by their type numbers.
-   Used for both stabs and coff.  (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.)  */
-
-EXTERN struct type **type_vector;
-
-/* Number of elements allocated for type_vector currently.  */
-
-EXTERN 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
-
 extern void add_symbol_to_list (struct symbol *symbol,
                                struct pending **listhead);
 
@@ -284,7 +238,8 @@ extern struct context_stack *pop_context (void);
 
 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);
 
@@ -307,10 +262,19 @@ extern void record_producer (const char *producer);
 extern void merge_symbol_lists (struct pending **srclist,
                                struct pending **targetlist);
 
-/* The macro table for the compilation unit whose symbols we're
-   currently reading.  All the symtabs for this CU will point to
-   this.  */
-EXTERN struct macro_table *pending_macros;
+/* 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);
+
+/* Return the macro table.  */
+
+extern struct macro_table *get_macro_table (struct objfile *objfile,
+                                           const char *comp_dir);
 
 #undef EXTERN
 
This page took 0.114074 seconds and 4 git commands to generate.