diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-10-12 19:34:27 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-10-12 19:34:27 +0000 |
commit | 235d1e032292b26ef7f9e66bab679edc8455f535 (patch) | |
tree | e5edb7a50332073dc34dc7dae258ca59012f2462 /gdb/symtab.h | |
parent | 627427debc29d3c6758a637edc47d6b6fa2860fd (diff) | |
download | gdb-235d1e032292b26ef7f9e66bab679edc8455f535.zip gdb-235d1e032292b26ef7f9e66bab679edc8455f535.tar.gz gdb-235d1e032292b26ef7f9e66bab679edc8455f535.tar.bz2 |
2000-10-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From Daniel Berlin <dberlin@redhat.com> :
* symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Initialize the symbol
language to auto instead of unknown, so it will try to demangle
the symbol.
* symtab.h (OPNAME_PREFIX_P): Change operator prefix to correct value.
* symtab.c (gdb_mangle_name): Properly handle C++ operators.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 55db0f8..d76df87 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -170,6 +170,8 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *); #define SYMBOL_INIT_DEMANGLED_NAME(symbol,obstack) \ do { \ char *demangled = NULL; \ + if (SYMBOL_LANGUAGE (symbol) == language_unknown) \ + SYMBOL_LANGUAGE (symbol) = language_auto; \ if (SYMBOL_LANGUAGE (symbol) == language_cplus \ || SYMBOL_LANGUAGE (symbol) == language_auto) \ { \ @@ -222,10 +224,6 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *); SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; \ } \ } \ - if (SYMBOL_LANGUAGE (symbol) == language_auto) \ - { \ - SYMBOL_LANGUAGE (symbol) = language_unknown; \ - } \ } while (0) /* Macro that returns the demangled name for a symbol based on the language @@ -1047,13 +1045,9 @@ struct partial_symtab #define VTBL_FNADDR_OFFSET 2 /* Macro that yields non-zero value iff NAME is the prefix for C++ operator - names. If you leave out the parenthesis here you will lose! - Currently 'o' 'p' CPLUS_MARKER is used for both the symbol in the - symbol-file and the names in gdb's symbol table. - Note that this macro is g++ specific (FIXME). */ - + names. If you leave out the parenthesis here you will lose! */ #define OPNAME_PREFIX_P(NAME) \ - ((NAME)[0] == 'o' && (NAME)[1] == 'p' && is_cplus_marker ((NAME)[2])) + (!strncmp (NAME, "operator", 8)) /* Macro that yields non-zero value iff NAME is the prefix for C++ vtbl names. Note that this macro is g++ specific (FIXME). |