#define SYMBOL_INIT_DEMANGLED_NAME(symbol,obstack) \
do { \
char *demangled = NULL; \
+ if (SYMBOL_LANGUAGE (symbol) == language_unknown) \
+ SYMBOL_LANGUAGE (symbol) = language_auto; \
if (SYMBOL_LANGUAGE (symbol) == language_cplus \
|| SYMBOL_LANGUAGE (symbol) == language_auto) \
{ \
SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; \
} \
} \
- if (SYMBOL_LANGUAGE (symbol) == language_auto) \
- { \
- SYMBOL_LANGUAGE (symbol) = language_unknown; \
- } \
} while (0)
/* Macro that returns the demangled name for a symbol based on the language
\f
/* Source-file information. This describes the relation between source files,
- ine numbers and addresses in the program text. */
+ line numbers and addresses in the program text. */
struct sourcevector
{
CORE_ADDR offsets[1]; /* As many as needed. */
};
-#define ANOFFSET(secoff, whichone) (secoff->offsets[whichone])
+#define ANOFFSET(secoff, whichone) \
+ ((whichone == -1) ? \
+ (internal_error ("Section index is uninitialized"), -1) : secoff->offsets[whichone])
/* The maximum possible size of a section_offsets table. */
/* Pointer to function which will read in the symtab corresponding to
this psymtab. */
- void (*read_symtab) PARAMS ((struct partial_symtab *));
+ void (*read_symtab) (struct partial_symtab *);
/* Information that lets read_symtab() locate the part of the symbol table
that this psymtab corresponds to. This information is private to the
#define VTBL_FNADDR_OFFSET 2
/* Macro that yields non-zero value iff NAME is the prefix for C++ operator
- names. If you leave out the parenthesis here you will lose!
- Currently 'o' 'p' CPLUS_MARKER is used for both the symbol in the
- symbol-file and the names in gdb's symbol table.
- Note that this macro is g++ specific (FIXME). */
-
+ names. If you leave out the parenthesis here you will lose! */
#define OPNAME_PREFIX_P(NAME) \
- ((NAME)[0] == 'o' && (NAME)[1] == 'p' && is_cplus_marker ((NAME)[2]))
+ (!strncmp (NAME, "operator", 8))
/* 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)[0] == '_' \
+ (((NAME)[0] == '_' \
&& (((NAME)[1] == 'V' && (NAME)[2] == 'T') \
|| ((NAME)[1] == 'v' && (NAME)[2] == 't')) \
- && is_cplus_marker ((NAME)[3]))
+ && is_cplus_marker ((NAME)[3])) || ((NAME)[0]=='_' && (NAME)[1]=='_' \
+ && (NAME)[2]=='v' && (NAME)[3]=='t' && (NAME)[4]=='_'))
/* Macro that yields non-zero value iff NAME is the prefix for C++ destructor
names. Note that this macro is g++ specific (FIXME). */
extern struct symtabs_and_lines decode_line_spec_1 (char *, int);
-extern struct symtabs_and_lines
-decode_line_1 (char **, int, struct symtab *, int, char ***);
+/* From linespec.c */
+
+extern struct symtabs_and_lines decode_line_1 (char **,
+ int, struct symtab *, int, char ***);
/* Symmisc.c */
extern struct partial_symtab *find_main_psymtab (void);
+extern struct symtab *find_line_symtab (struct symtab *, int, int *, int *);
+
+extern struct symtab_and_line find_function_start_sal (struct symbol *sym, int);
+
/* blockframe.c */
extern struct blockvector *blockvector_for_pc (CORE_ADDR, int *);
extern struct symbol *fixup_symbol_section (struct symbol *,
struct objfile *);
+extern struct partial_symbol *fixup_psymbol_section (struct partial_symbol
+ *psym,
+ struct objfile *objfile);
+
/* Symbol searching */
/* When using search_symbols, a list of the following structs is returned.
- Callers must free the search list using free_symbol_search! */
+ Callers must free the search list using free_search_symbols! */
struct symbol_search
{
/* The block in which the match was found. Could be, for example,