diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-10-23 18:16:44 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-10-23 18:16:44 +0000 |
commit | 89aad1f99e80e605e01a69d74e13263b1841d361 (patch) | |
tree | fa790bdcbe9cd4473ed5ea6c478160c1f8684d98 /gdb/symtab.h | |
parent | d9fa45febb9bd6f117a0687efd5e2d706d2670ff (diff) | |
download | gdb-89aad1f99e80e605e01a69d74e13263b1841d361.zip gdb-89aad1f99e80e605e01a69d74e13263b1841d361.tar.gz gdb-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.h')
-rw-r--r-- | gdb/symtab.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index b84cac6..3863747 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -139,32 +139,12 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *); #define SYMBOL_CPLUS_DEMANGLED_NAME(symbol) \ (symbol)->ginfo.language_specific.cplus_specific.demangled_name -/* Macro that initializes the language dependent portion of a symbol +/* Initializes the language dependent portion of a symbol depending upon the language for the symbol. */ - -#define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \ - do { \ - SYMBOL_LANGUAGE (symbol) = language; \ - if (SYMBOL_LANGUAGE (symbol) == language_cplus \ - || SYMBOL_LANGUAGE (symbol) == language_java \ - ) \ - { \ - SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL; \ - } \ - else if (SYMBOL_LANGUAGE (symbol) == language_objc) \ - { \ - SYMBOL_OBJC_DEMANGLED_NAME (symbol) = NULL; \ - } \ - /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \ - /* OBSOLETE { */ \ - /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */ \ - /* OBSOLETE } */ \ - else \ - { \ - memset (&(symbol)->ginfo.language_specific, 0, \ - sizeof ((symbol)->ginfo.language_specific)); \ - } \ - } while (0) +#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_INIT_DEMANGLED_NAME(symbol,obstack) \ (symbol_init_demangled_name (&symbol->ginfo, (obstack))) |