]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/buildsym.h
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / buildsym.h
index f16ffc57748b1742e3b61df3eedc11a177dc89da..cb16be19c3071416a349df76bb6418518768cd4a 100644 (file)
@@ -1,11 +1,12 @@
 /* Build symbol tables in GDB's internal format.
-   Copyright 1986-1993, 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1996,
+   1997, 1998, 1999, 2000, 2002, 2003, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #if !defined (BUILDSYM_H)
 #define BUILDSYM_H 1
 
+struct objfile;
+struct symbol;
+
 /* This module provides definitions used for creating and adding to
    the symbol table.  These routines are called from various symbol-
    file-reading routines.
@@ -33,6 +35,8 @@
    normally extern, but which get defined in a single module using
    this technique.  */
 
+struct block;
+
 #ifndef EXTERN
 #define        EXTERN extern
 #endif
@@ -62,7 +66,9 @@ struct subfile
     struct linetable *line_vector;
     int line_vector_length;
     enum language language;
+    char *producer;
     char *debugformat;
+    struct symtab *symtab;
   };
 
 EXTERN struct subfile *subfiles;
@@ -82,16 +88,6 @@ EXTERN unsigned char processing_gcc_compilation;
 
 EXTERN unsigned char processing_acc_compilation;
 
-/* elz: added this flag to know when a block is compiled with HP
-   compilers (cc, aCC). This is necessary because of the macro
-   COERCE_FLOAT_TO_DOUBLE defined in tm_hppa.h, which causes a
-   coercion of float to double to always occur in parameter passing
-   for a function called by gdb (see the function value_arg_coerce in
-   valops.c). This is necessary only if the target was compiled with
-   gcc, not with HP compilers or with g++ */
-
-EXTERN unsigned char processing_hp_compilation;
-
 /* Count symbols as they are processed, for error messages.  */
 
 EXTERN unsigned int symnum;
@@ -172,11 +168,8 @@ EXTERN int context_stack_depth;
 
 EXTERN int context_stack_size;
 
-/* Macro "function" for popping contexts from the stack.  Pushing is
-   done by a real function, push_context.  This returns a pointer to a
-   struct context_stack.  */
-
-#define        pop_context() (&context_stack[--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).  */
@@ -231,6 +224,8 @@ EXTERN int type_vector_length;
 
 #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);
 
@@ -243,7 +238,7 @@ extern void finish_block (struct symbol *symbol,
                          CORE_ADDR start, CORE_ADDR end,
                          struct objfile *objfile);
 
-extern void really_free_pendings (int foo);
+extern void really_free_pendings (void *dummy);
 
 extern void start_subfile (char *name, char *dirname);
 
@@ -266,6 +261,8 @@ extern void buildsym_init (void);
 
 extern struct context_stack *push_context (int desc, CORE_ADDR valu);
 
+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);
@@ -274,12 +271,6 @@ extern int hashname (char *name);
 
 extern void free_pending_blocks (void);
 
-/* FIXME: Note that this is used only in buildsym.c and dstread.c,
-   which should be fixed to not need direct access to
-   make_blockvector. */
-
-extern struct blockvector *make_blockvector (struct objfile *objfile);
-
 /* FIXME: Note that this is used only in buildsym.c and dstread.c,
    which should be fixed to not need direct access to
    record_pending_block. */
@@ -290,9 +281,15 @@ extern void record_pending_block (struct objfile *objfile,
 
 extern void record_debugformat (char *format);
 
+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;
+
 #undef EXTERN
 
 #endif /* defined (BUILDSYM_H) */