diff options
author | Fred Fish <fnf@specifix.com> | 1993-01-01 20:29:41 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1993-01-01 20:29:41 +0000 |
commit | 7532cf103ab3dfcee75eed7425575c2fbe025e96 (patch) | |
tree | d4291f259a876a3d4a1115a1f100410435a6be96 /gdb/minsyms.c | |
parent | 19d0f3f41df4654c842e29c9c09f58dd3ddf9951 (diff) | |
download | gdb-7532cf103ab3dfcee75eed7425575c2fbe025e96.zip gdb-7532cf103ab3dfcee75eed7425575c2fbe025e96.tar.gz gdb-7532cf103ab3dfcee75eed7425575c2fbe025e96.tar.bz2 |
* tm-sun4sol2.h (CPLUS_MARKER): Remove, now set in tm-sysv4.h.
* tm-sysv4.h (CPLUS_MARKER): By default, g++ uses '.' as the
CPLUS_MARKER for all SVR4 systems, so follow suit.
* defs.h (strdup_demangled): Remove prototype.
* dwarfread.c (enum_type, synthesize_typedef): Use new macro
SYMBOL_INIT_LANGUAGE_SPECIFIC.
* dwarfread.c (new_symbol): Use SYMBOL_INIT_DEMANGLED_NAME.
* minsyms.c (install_minimal_symbols, prim_record_minimal_symbol,
prim_record_minimal_symbol_and_info): Use new macro
SYMBOL_INIT_LANGUAGE_SPECIFIC.
* minsyms.c (install_minimal_symbols): Use new macro
SYMBOL_INIT_DEMANGLED_NAME.
* stabsread.c (define_symbol): Use new macro
SYMBOL_INIT_DEMANGLED_NAME.
* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
Use new macro SYMBOL_INIT_DEMANGLED_NAME.
* symfile.h (ADD_PSYMBOL_VT_TO_LIST): Use new macro
SYMBOL_INIT_DEMANGLED_NAME.
* symmisc.c (dump_msymbols, dump_symtab, print_partial_symbol):
SYMBOL_DEMANGLED_NAME now tests language itself.
* symtab.c (COMPLETION_LIST_ADD_SYMBOL): SYMBOL_DEMANGLED_NAME
now tests language itself.
* symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): New macro that does
what SYMBOL_DEMANGLED_NAME used to do, directly access the C++
mangled name member in the language dependent portion of a symbol.
* symtab.h (SYMBOL_DEMANGLED_NAME): New macro that returns the
mangled name member appropriate for a symbol's language.
* symtab.h (SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME,
SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP):
SYMBOL_DEMANGLED_NAME now tests language itself.
* symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): New macro that
initializes language dependent portion of symbol.
* symtab.h (SYMBOL_INIT_DEMANGLED_NAME): New macro that
demangles and caches the demangled form of symbol names.
* utils.c (fputs_demangled, fprint_symbol): Use current language
to select an appropriate demangling algorithm.
* utils.c (strdup_demangled): Remove, no longer used.
**** start-sanitize-chill ****
* symtab.h (SYMBOL_CHILL_DEMANGLED_NAME): New macro that directly
access the Chill mangled name member in the language dependent
portion of a symbol.
* ch-lang.c (chill_demangle): New function, simple demangler.
* defs.h (chill_demangle): Add prototype.
* symtab.h (language_dependent_info): Add struct for Chill.
**** end-sanitize-chill ****
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 66ac922..b4ee141 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -264,12 +264,7 @@ prim_record_minimal_symbol (name, address, ms_type) } 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; MSYMBOL_TYPE (msymbol) = ms_type; /* FIXME: This info, if it remains, needs its own field. */ @@ -300,12 +295,7 @@ prim_record_minimal_symbol_and_info (name, address, ms_type, info) } 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; MSYMBOL_TYPE (msymbol) = ms_type; /* FIXME: This info, if it remains, needs its own field. */ @@ -539,8 +529,7 @@ install_minimal_symbols (objfile) 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 @@ -554,24 +543,7 @@ install_minimal_symbols (objfile) 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); } } } |