+2010-08-09 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * symtab.h: Renamed SYMBOL_INIT_LANGUAGE_SPECIFIC to
+ SYMBOL_SET_LANGUAGE.
+ (symbol_init_language_specific): Renamed to symbol_set_language.
+ * symtab.c (symbol_init_language_specific): Removed redundant check
+ for language_cplus.
+ Renamed to symbol_set_language.
+ * stabsread.c (define_symbol): Updated.
+ (read_enum_type): Updated
+ * psymtab.c (add_psymbol_to_bcache): Updated.
+ * minsyms.c (install_minimal_symbols): Updated.
+ * coffread.c (process_coff_symbol): SYMBOL_SET_LANGUAGE instead of
+ SYMBOL_LANGUAGE to set the language.
+ * minsyms.c (prim_record_minimal_symbol_full): Ditto.
+ * mdebugread.c (new_symbol): Ditto.
+ * cp-namespace.c (check_one_possible_namespace_symbol): Ditto.
+ * dwarf2read.c (new_symbol_full): Ditto.
+ * jv-lang.c (add_class_symbol): Ditto.
+
2010-08-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* defs.h (make_cleanup_restore_uinteger, make_cleanup_restore_ui_file)
memset (sym, 0, sizeof (struct symbol));
name = cs->c_name;
name = EXTERNAL_NAME (name, objfile->obfd);
- SYMBOL_LANGUAGE (sym) = current_subfile->language;
+ SYMBOL_SET_LANGUAGE (sym, current_subfile->language);
SYMBOL_SET_NAMES (sym, name, strlen (name), 1, objfile);
/* default assumptions */
sym = obstack_alloc (&objfile->objfile_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_LANGUAGE (sym) = language_cplus;
+ SYMBOL_SET_LANGUAGE (sym, language_cplus);
/* Note that init_type copied the name to the objfile's
obstack. */
SYMBOL_SET_NAMES (sym, TYPE_NAME (type), len, 0, objfile);
OBJSTAT (objfile, n_syms++);
/* Cache this symbol's name and the name's demangled form (if any). */
- SYMBOL_LANGUAGE (sym) = cu->language;
+ SYMBOL_SET_LANGUAGE (sym, cu->language);
linkagename = dwarf2_physname (name, die, cu);
SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile);
sym = (struct symbol *)
obstack_alloc (&dynamics_objfile->objfile_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_LANGUAGE (sym) = language_java;
+ SYMBOL_SET_LANGUAGE (sym, language_java);
SYMBOL_SET_LINKAGE_NAME (sym, TYPE_TAG_NAME (type));
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
/* SYMBOL_VALUE (sym) = valu; */
sizeof (struct symbol)));
memset (s, 0, sizeof (*s));
- SYMBOL_LANGUAGE (s) = psymtab_language;
+ SYMBOL_SET_LANGUAGE (s, psymtab_language);
SYMBOL_SET_NAMES (s, name, strlen (name), 1, current_objfile);
return s;
}
msym_bunch = new;
}
msymbol = &msym_bunch->contents[msym_bunch_index];
- SYMBOL_INIT_LANGUAGE_SPECIFIC (msymbol, language_unknown);
- SYMBOL_LANGUAGE (msymbol) = language_auto;
+ SYMBOL_SET_LANGUAGE (msymbol, language_auto);
SYMBOL_SET_NAMES (msymbol, name, name_len, copy_name, objfile);
SYMBOL_VALUE_ADDRESS (msymbol) = address;
MSYMBOL_TARGET_FLAG_2 (&msymbols[mcount]) = 0;
MSYMBOL_SIZE (&msymbols[mcount]) = 0;
MSYMBOL_TYPE (&msymbols[mcount]) = mst_unknown;
- SYMBOL_INIT_LANGUAGE_SPECIFIC (&msymbols[mcount], language_unknown);
+ SYMBOL_SET_LANGUAGE (&msymbols[mcount], language_unknown);
/* Attach the minimal symbol table to the specified objfile.
The strings themselves are also located in the objfile_obstack
memset (m, 0, sizeof (*m));
/* Don't rely on these enumeration values being 0's. */
MSYMBOL_TYPE (m) = mst_unknown;
- SYMBOL_INIT_LANGUAGE_SPECIFIC (m, language_unknown);
+ SYMBOL_SET_LANGUAGE (m, language_unknown);
}
}
SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
}
SYMBOL_SECTION (&psymbol) = 0;
- SYMBOL_LANGUAGE (&psymbol) = language;
+ SYMBOL_SET_LANGUAGE (&psymbol, language);
PSYMBOL_DOMAIN (&psymbol) = domain;
PSYMBOL_CLASS (&psymbol) = class;
else
{
normal:
- SYMBOL_LANGUAGE (sym) = current_subfile->language;
+ SYMBOL_SET_LANGUAGE (sym, current_subfile->language);
if (SYMBOL_LANGUAGE (sym) == language_cplus)
{
char *name = alloca (p - string + 1);
obstack_alloc (&objfile->objfile_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
SYMBOL_SET_LINKAGE_NAME (sym, name);
- SYMBOL_LANGUAGE (sym) = current_subfile->language;
+ SYMBOL_SET_LANGUAGE (sym, current_subfile->language);
SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_VALUE (sym) = n;
/* Initialize the language dependent portion of a symbol
depending upon the language for the symbol. */
void
-symbol_init_language_specific (struct general_symbol_info *gsymbol,
- enum language language)
+symbol_set_language (struct general_symbol_info *gsymbol,
+ enum language language)
{
-
gsymbol->language = language;
- if (gsymbol->language == language_cplus
- || gsymbol->language == language_d
+ if (gsymbol->language == language_d
|| gsymbol->language == language_java
|| gsymbol->language == language_objc
|| gsymbol->language == language_fortran)
/* Note that all the following SYMBOL_* macros are used with the
SYMBOL argument being either a partial symbol, a minimal symbol or
a full symbol. All three types have a ginfo field. In particular
- the SYMBOL_INIT_LANGUAGE_SPECIFIC, SYMBOL_DEMANGLED_NAME, etc.
+ the SYMBOL_SET_LANGUAGE, SYMBOL_DEMANGLED_NAME, etc.
macros cannot be entirely substituted by
functions, unless the callers are changed to pass in the ginfo
field only, instead of the SYMBOL parameter. */
/* Initializes the language dependent portion of a symbol
depending upon the language for the symbol. */
-#define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \
- (symbol_init_language_specific (&(symbol)->ginfo, (language)))
-extern void symbol_init_language_specific (struct general_symbol_info *symbol,
- enum language language);
+#define SYMBOL_SET_LANGUAGE(symbol,language) \
+ (symbol_set_language (&(symbol)->ginfo, (language)))
+extern void symbol_set_language (struct general_symbol_info *symbol,
+ enum language language);
/* Set just the linkage name of a symbol; do not try to demangle
it. Used for constructs which do not have a mangled name,