aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-10-23 18:16:44 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-10-23 18:16:44 +0000
commit89aad1f99e80e605e01a69d74e13263b1841d361 (patch)
treefa790bdcbe9cd4473ed5ea6c478160c1f8684d98 /gdb/symtab.c
parentd9fa45febb9bd6f117a0687efd5e2d706d2670ff (diff)
downloadbinutils-89aad1f99e80e605e01a69d74e13263b1841d361.zip
binutils-89aad1f99e80e605e01a69d74e13263b1841d361.tar.gz
binutils-89aad1f99e80e605e01a69d74e13263b1841d361.tar.bz2
2002-10-23 Elena Zannoni <ezannoni@redhat.com>
* symtab.c (symbol_init_language_specific): New function. * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): Simplify macro, by turning most of it into a function. (symbol_init_language_specific): Export.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a432292..7b70aa7 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -385,6 +385,33 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
}
+/* 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)
+{
+ gsymbol->language = language;
+ if (gsymbol->language == language_cplus
+ || gsymbol->language == language_java)
+ {
+ gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+ }
+ else if (gsymbol->language == language_objc)
+ {
+ gsymbol->language_specific.objc_specific.demangled_name = NULL;
+ }
+ /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */
+ /* OBSOLETE { */
+ /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */
+ /* OBSOLETE } */
+ else
+ {
+ memset (&gsymbol->language_specific, 0,
+ sizeof (gsymbol->language_specific));
+ }
+}
+
/* Initialize a symbol's mangled name. */
/* Try to initialize the demangled name for a symbol, based on the