* test-build.mk (HOLES): Add "xargs" for gdb.
[deliverable/binutils-gdb.git] / gdb / symtab.h
index 777b1079d1550366d2aa23fb2d0b581f2609988e..6d1b22e7e071eccaea2fbd7aa386d36e2c0d01fe 100644 (file)
@@ -1,5 +1,5 @@
 /* Symbol table definitions for GDB.
-   Copyright 1986, 1989, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1986, 1989, 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "obstack.h"
 #define obstack_chunk_alloc xmalloc
 #define obstack_chunk_free free
+#include "bcache.h"
 
 /* Don't do this; it means that if some .o's are compiled with GNU C
    and some are not (easy to do accidentally the way we configure
@@ -432,8 +433,8 @@ struct block
 
 /* Different name spaces for symbols.  Looking up a symbol specifies a
    namespace and ignores symbol definitions in other name spaces. */
-
-enum namespace
+typedef enum 
 {
   /* UNDEF_NAMESPACE is used when a namespace has not been discovered or
      none of the following apply.  This usually indicates an error either
@@ -456,7 +457,7 @@ enum namespace
      currently it is not used and labels are not recorded at all.  */
 
   LABEL_NAMESPACE
-};
+} namespace_enum;
 
 /* An address-class says where to find the value of a symbol.  */
 
@@ -559,6 +560,18 @@ enum address_class
 
   LOC_BASEREG_ARG,
 
+  /* Value is at fixed address, but the address of the variable has
+     to be determined from the minimal symbol table whenever the
+     variable is referenced.
+     This happens if debugging information for a global symbol is
+     emitted and the corresponding minimal symbol is defined
+     in another object file or runtime common storage.
+     The linker might even remove the minimal symbol if the global
+     symbol is never referenced, in which case the symbol remains
+     unresolved.  */
+
+  LOC_UNRESOLVED,
+
   /* The variable does not actually exist in the program.
      The value is ignored.  */
 
@@ -578,7 +591,7 @@ struct symbol
 
   /* Name space code.  */
 
-  enum namespace namespace BYTE_BITFIELD;
+  namespace_enum namespace BYTE_BITFIELD;
 
   /* Address class */
 
@@ -623,7 +636,7 @@ struct partial_symbol
 
   /* Name space code.  */
 
-  enum namespace namespace BYTE_BITFIELD;
+  namespace_enum namespace BYTE_BITFIELD;
 
   /* Address class (for info_symbols) */
 
@@ -704,6 +717,13 @@ struct section_offsets
 
 #define        ANOFFSET(secoff, whichone)      (secoff->offsets[whichone])
 
+/* The maximum possible size of a section_offsets table.  */
+#define SIZEOF_SECTION_OFFSETS \
+  (sizeof (struct section_offsets) \
+   + sizeof (((struct section_offsets *) 0)->offsets) * (SECT_OFF_MAX-1))
+
+
 /* Each source file or header is represented by a struct symtab. 
    These objects are chained through the `next' field.  */
 
@@ -919,7 +939,7 @@ struct partial_symtab
    Note that this macro is g++ specific (FIXME). */
 
 #define OPNAME_PREFIX_P(NAME) \
-  ((NAME)[0] == 'o' && (NAME)[1] == 'p' && (NAME)[2] == CPLUS_MARKER)
+  ((NAME)[0] == 'o' && (NAME)[1] == 'p' && is_cplus_marker ((NAME)[2]))
 
 /* Macro that yields non-zero value iff NAME is the prefix for C++ vtbl
    names.  Note that this macro is g++ specific (FIXME).
@@ -927,15 +947,16 @@ struct partial_symtab
    style, using thunks (where '$' is really CPLUS_MARKER). */
 
 #define VTBL_PREFIX_P(NAME) \
-  ((NAME)[3] == CPLUS_MARKER && (NAME)[0] == '_' \
+  ((NAME)[0] == '_' \
    && (((NAME)[1] == 'V' && (NAME)[2] == 'T') \
-       || ((NAME)[1] == 'v' && (NAME)[2] == 't')))
+       || ((NAME)[1] == 'v' && (NAME)[2] == 't')) \
+   && is_cplus_marker ((NAME)[3]))
 
 /* Macro that yields non-zero value iff NAME is the prefix for C++ destructor
    names.  Note that this macro is g++ specific (FIXME).  */
 
 #define DESTRUCTOR_PREFIX_P(NAME) \
-  ((NAME)[0] == '_' && (NAME)[1] == CPLUS_MARKER && (NAME)[2] == '_')
+  ((NAME)[0] == '_' && is_cplus_marker ((NAME)[1]) && (NAME)[2] == '_')
 
 \f
 /* External variables and functions for the objects described above. */
@@ -952,6 +973,10 @@ extern int current_source_line;
 
 extern struct objfile *current_objfile;
 
+/* True if we are nested inside psymtab_to_symtab. */
+
+extern int currently_reading_symtab;
+
 /* From utils.c.  */
 extern int demangle;
 extern int asm_demangle;
@@ -961,11 +986,11 @@ lookup_symtab PARAMS ((char *));
 
 extern struct symbol *
 lookup_symbol PARAMS ((const char *, const struct block *,
-                      const enum namespace, int *, struct symtab **));
+                      const namespace_enum, int *, struct symtab **));
 
 extern struct symbol *
 lookup_block_symbol PARAMS ((const struct block *, const char *,
-                            const enum namespace));
+                            const namespace_enum));
 
 extern struct type *
 lookup_struct PARAMS ((char *, struct block *));
@@ -1044,6 +1069,11 @@ lookup_minimal_symbol PARAMS ((const char *, const char *, struct objfile *));
 extern struct minimal_symbol *
 lookup_minimal_symbol_text PARAMS ((const char *, const char *, struct objfile *));
 
+struct minimal_symbol *
+lookup_minimal_symbol_solib_trampoline PARAMS ((const char *,
+                                               const char *,
+                                               struct objfile *));
+
 extern struct minimal_symbol *
 lookup_minimal_symbol_by_pc PARAMS ((CORE_ADDR));
 
This page took 0.025376 seconds and 4 git commands to generate.