doc/gdbinv-s.m4.in: remove text on special procedures to continue after
[deliverable/binutils-gdb.git] / gdb / symtab.h
index eeb8a53a08d4b025f4f12a0cba191468ea5957b6..dae1e6189be56dce710c392e43b85ebaf78015be 100644 (file)
@@ -30,12 +30,12 @@ extern struct objfile *current_objfile;
 #define obstack_chunk_free free
 
 /* Some macros for char-based bitfields.  */
-#define B_SET(a,x) (a[x>>3] |= (1 << (x&7)))
-#define B_CLR(a,x) (a[x>>3] &= ~(1 << (x&7)))
-#define B_TST(a,x) (a[x>>3] & (1 << (x&7)))
+#define B_SET(a,x) ((a)[(x)>>3] |= (1 << ((x)&7)))
+#define B_CLR(a,x) ((a)[(x)>>3] &= ~(1 << ((x)&7)))
+#define B_TST(a,x) ((a)[(x)>>3] & (1 << ((x)&7)))
 #define B_TYPE         unsigned char
 #define        B_BYTES(x)      ( 1 + ((x)>>3) )
-#define        B_CLRALL(a,x) bzero (a, B_BYTES(x))
+#define        B_CLRALL(a,x) memset ((a), 0, B_BYTES(x))
 
 
 /* Define a simple structure used to hold some very basic information about
@@ -334,6 +334,23 @@ struct source
   struct linetable contents;
 };
 
+/* How to relocate the symbols from each section in a symbol file.
+   Each struct contains an array of offsets.
+   The ordering and meaning of the offsets is file-type-dependent;
+   typically it is indexed by section numbers or symbol types or
+   something like that.
+
+   To give us flexibility in changing the internal representation
+   of these offsets, the ANOFFSET macro must be used to insert and
+   extract offset values in the struct.  */
+
+struct section_offsets
+  {
+    CORE_ADDR offsets[1];              /* As many as needed. */
+  };
+
+#define        ANOFFSET(secoff, whichone)      (secoff->offsets[whichone])
+
 /* Each source file is represented by a struct symtab. 
    These objects are chained through the `next' field.  */
 
@@ -404,10 +421,9 @@ struct partial_symtab
   /* Information about the object file from which symbols should be read.  */
   struct objfile *objfile;
 
-  /* Address relative to which the symbols in this file are.  Need to
-     relocate by this amount when reading in symbols from the symbol
-     file.  */
-  CORE_ADDR addr;
+  /* Set of relocation offsets to apply to each section.  */ 
+  struct section_offsets *section_offsets;
+
   /* Range of text addresses covered by this file; texthigh is the
      beginning of the next section. */
   CORE_ADDR textlow, texthigh;
@@ -490,7 +506,15 @@ extern int current_source_line;
 #define SYMBOL_VALUE_CHAIN(symbol) (symbol)->value.chain
 #define SYMBOL_TYPE(symbol) (symbol)->type
 #define SYMBOL_LINE(symbol) (symbol)->line
+#if 0
+/* This currently fails because some symbols are not being initialized
+   to zero on allocation, and no code is currently setting this value.
+   Basereg handling will probably change significantly in the next release.
+   FIXME -fnf */
 #define SYMBOL_BASEREG_VALID(symbol) (symbol)->aux_value.basereg.regno_valid
+#else
+#define SYMBOL_BASEREG_VALID(symbol) 0
+#endif
 #define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg.regno
 
 /* The virtual function table is now an array of structures
@@ -538,6 +562,15 @@ lookup_union PARAMS ((char *, struct block *));
 extern struct type *
 lookup_enum PARAMS ((char *, struct block *));
 
+extern struct type *
+check_struct PARAMS ((struct type *));
+
+extern struct type *
+check_union PARAMS ((struct type *));
+
+extern struct type *
+check_enum PARAMS ((struct type *));
+
 extern struct symbol *
 block_function PARAMS ((struct block *));
 
@@ -578,6 +611,11 @@ extern void
 prim_record_minimal_symbol PARAMS ((const char *, CORE_ADDR,
                                    enum minimal_symbol_type));
 
+extern void
+prim_record_minimal_symbol_and_info PARAMS ((const char *, CORE_ADDR,
+                                            enum minimal_symbol_type,
+                                            char *info));
+
 extern struct minimal_symbol *
 lookup_minimal_symbol PARAMS ((const char *, struct objfile *));
 
@@ -639,6 +677,22 @@ decode_line_1 PARAMS ((char **, int, struct symtab *, int));
 
 /* Symmisc.c */
 
+#if MAINTENANCE_CMDS
+
+void
+maintenance_print_symbols PARAMS ((char *, int));
+
+void
+maintenance_print_psymbols PARAMS ((char *, int));
+
+void
+maintenance_print_msymbols PARAMS ((char *, int));
+
+void
+maintenance_print_objfiles PARAMS ((char *, int));
+
+#endif
+
 extern void
 free_symtab PARAMS ((struct symtab *));
 
@@ -672,9 +726,15 @@ make_symbol_completion_list PARAMS ((char *));
 
 /* symtab.c */
 
+extern void
+clear_symtab_users_once PARAMS ((void));
+
 extern struct partial_symtab *
 find_main_psymtab PARAMS ((void));
 
+extern struct type *
+find_nested_type PARAMS ((struct type *, char*));
+
 /* blockframe.c */
 
 extern struct blockvector *
This page took 0.024919 seconds and 4 git commands to generate.