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