}
msymbol = &msym_bunch -> contents[msym_bunch_index];
SYMBOL_NAME (msymbol) = (char *) name;
- /* Note that SYMBOL_LANGUAGE and SYMBOL_DEMANGLED_NAME are not initialized
- to their final values until the minimal symbols are actually added to
- the minimal symbol table. We just set them to a known state here so
- random values won't confuse anyone debugging the debugger. */
- SYMBOL_LANGUAGE (msymbol) = language_unknown;
- SYMBOL_DEMANGLED_NAME (msymbol) = NULL;
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (msymbol, language_unknown);
SYMBOL_VALUE_ADDRESS (msymbol) = address;
+ SYMBOL_SECTION (msymbol) = -1;
MSYMBOL_TYPE (msymbol) = ms_type;
/* FIXME: This info, if it remains, needs its own field. */
MSYMBOL_INFO (msymbol) = NULL; /* FIXME! */
and pass it a NULL info pointer value if info is not needed? */
void
-prim_record_minimal_symbol_and_info (name, address, ms_type, info)
+prim_record_minimal_symbol_and_info (name, address, ms_type, info, section)
const char *name;
CORE_ADDR address;
enum minimal_symbol_type ms_type;
char *info;
+ int section;
{
register struct msym_bunch *new;
register struct minimal_symbol *msymbol;
}
msymbol = &msym_bunch -> contents[msym_bunch_index];
SYMBOL_NAME (msymbol) = (char *) name;
- /* Note that SYMBOL_LANGUAGE and SYMBOL_DEMANGLED_NAME are not initialized
- to their final values until the minimal symbols are actually added to
- the minimal symbol table. We just set them to a known state here so
- random values won't confuse anyone debugging the debugger. */
- SYMBOL_LANGUAGE (msymbol) = language_unknown;
- SYMBOL_DEMANGLED_NAME (msymbol) = NULL;
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (msymbol, language_unknown);
SYMBOL_VALUE_ADDRESS (msymbol) = address;
+ SYMBOL_SECTION (msymbol) = section;
MSYMBOL_TYPE (msymbol) = ms_type;
/* FIXME: This info, if it remains, needs its own field. */
MSYMBOL_INFO (msymbol) = info; /* FIXME! */
SYMBOL_VALUE_ADDRESS (&msymbols[mcount]) = 0;
MSYMBOL_INFO (&msymbols[mcount]) = NULL;
MSYMBOL_TYPE (&msymbols[mcount]) = mst_unknown;
- SYMBOL_LANGUAGE (&msymbols[mcount]) = language_unknown;
- SYMBOL_DEMANGLED_NAME (&msymbols[mcount]) = NULL;
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (&msymbols[mcount], language_unknown);
/* Attach the minimal symbol table to the specified objfile.
The strings themselves are also located in the symbol_obstack
for ( ; mcount-- > 0 ; msymbols++)
{
- if (SYMBOL_LANGUAGE (msymbols) == language_auto)
- {
- demangled_name = cplus_demangle (SYMBOL_NAME (msymbols),
- DMGL_PARAMS | DMGL_ANSI);
- if (demangled_name == NULL)
- {
- SYMBOL_LANGUAGE (msymbols) = language_unknown;
- }
- else
- {
- SYMBOL_LANGUAGE (msymbols) = language_cplus;
- SYMBOL_DEMANGLED_NAME (msymbols) =
- obsavestring (demangled_name, strlen (demangled_name),
- &objfile->symbol_obstack);
-
- free (demangled_name);
- }
- }
+ SYMBOL_INIT_DEMANGLED_NAME (msymbols, &objfile->symbol_obstack);
}
}
}