#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
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. */
/* 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;
#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
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 *));
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 *));
/* 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 *));
/* 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 *