* ada-lang.c (ada_decode_symbol): Check and set 'ada_mangled'.

Use symbol's obstack, not an objfile.
	* coffread.c (process_coff_symbol): Update.
	* dwarf2read.c (fixup_go_packaging, new_symbol_full): Update.
	* jv-lang.c (add_class_symbol): Update.
	* mdebugread.c (new_symbol): Update.
	* minsyms.c (prim_record_minimal_symbol_full)
	(terminate_minimal_symbol_table): Update.
	* psymtab.c (add_psymbol_to_bcache): Clear entire symbol.  Update.
	* stabsread.c (define_symbol, read_enum_type): Update.
	* symtab.c (symbol_set_demangled_name, symbol_get_demangled_name):
	Handle Ada specially.
	(symbol_set_language): Add 'obstack' argument.
	(symbol_set_names): Update.
	(symbol_natural_name, symbol_demangled_name): Always use
	ada_decode_symbol.
	* symtab.h (struct general_symbol_info)
	<language_specific::obstack>: New field.
	<ada_mangled>: New field.
	(SYMBOL_SET_LANGUAGE): Add 'obstack' argument.
	(symbol_set_language): Update.
This commit is contained in:
Tom Tromey 2013-04-08 19:56:03 +00:00
parent ccde22c0a4
commit f85f34ede8
11 changed files with 103 additions and 47 deletions

View file

@ -135,6 +135,11 @@ struct general_symbol_info
union
{
/* A pointer to an obstack that can be used for storage associated
with this symbol. This is only used by Ada, and only when the
'ada_mangled' field is zero. */
struct obstack *obstack;
/* This is used by languages which wish to store a demangled name.
currently used by Ada, Java, and Objective C. */
struct mangled_lang
@ -153,6 +158,11 @@ struct general_symbol_info
ENUM_BITFIELD(language) language : 8;
/* This is only used by Ada. If set, then the 'mangled_lang' field
of language_specific is valid. Otherwise, the 'obstack' field is
valid. */
unsigned int ada_mangled : 1;
/* Which section is this symbol in? This is an index into
section_offsets for this objfile. Negative means that the symbol
does not get relocated relative to a section.
@ -196,10 +206,11 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
/* Initializes the language dependent portion of a symbol
depending upon the language for the symbol. */
#define SYMBOL_SET_LANGUAGE(symbol,language) \
(symbol_set_language (&(symbol)->ginfo, (language)))
#define SYMBOL_SET_LANGUAGE(symbol,language,obstack) \
(symbol_set_language (&(symbol)->ginfo, (language), (obstack)))
extern void symbol_set_language (struct general_symbol_info *symbol,
enum language language);
enum language language,
struct obstack *obstack);
/* Set just the linkage name of a symbol; do not try to demangle
it. Used for constructs which do not have a mangled name,