diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-04-27 00:19:09 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-04-27 00:19:09 +0000 |
commit | 015a42b4cf96cadcb996b6474ab61eca781fdde6 (patch) | |
tree | 9c6498c34c193f62714d7cded22a5537ec3be632 /gdb/symtab.h | |
parent | 20b8570d73f0a4e0e83a44d6aaa639a93a17f3b8 (diff) | |
download | gdb-015a42b4cf96cadcb996b6474ab61eca781fdde6.zip gdb-015a42b4cf96cadcb996b6474ab61eca781fdde6.tar.gz gdb-015a42b4cf96cadcb996b6474ab61eca781fdde6.tar.bz2 |
(Changes from Daniel Berlin, with revisions by Jim Blandy.)
Abstract out operations specific to particular C++ ABI's, and
invoke them through a function table. This removes the C++ ABI
dependencies scattered throughout the code, and allows us to
cleanly add support for new C++ ABI's.
* cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files.
* c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c,
jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c:
#include "cp-abi.h". These files all use functions now declared
there.
* symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P):
Deleted. These services are now provided by functions declared in
cp-abi.h.
* value.h (value_rtti_type, value_virtual_fn_field): Same.
* values.c (value_virtual_fn_field): Same, for this definition.
* valops.c (value_rtti_type): Same.
* c-typeprint.c (c_type_print_base): Use the functions from
"cp-abi.h", instead of the old macros, or hard-coded ABI-specific
tests.
* dbxread.c (record_minimal_symbol): Same.
* gdbtypes.c (get_destructor_fn_field, virtual_base_index,
virtual_base_index_skip_primaries): Same.
* jv-typeprint.c (java_type_print_base): Same.
* linespec.c (find_methods, decode_line_1): Same.
* symtab.c (gdb_mangle_name): Same.
* Makefile.in (SFILES): Add the new .c files mentioned above.
(cp_abi_h): New variable.
(COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o.
(cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets.
(c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o,
jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add
dependency on $(cp_abi_h).
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index a4f224d..bbde658 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1046,30 +1046,6 @@ 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! */ -#define OPNAME_PREFIX_P(NAME) \ - (!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). - '_vt$' is the old cfront-style vtables; '_VT$' is the new - style, using thunks (where '$' is really CPLUS_MARKER). */ - -#define VTBL_PREFIX_P(NAME) \ - (((NAME)[0] == '_' \ - && (((NAME)[1] == 'V' && (NAME)[2] == 'T') \ - || ((NAME)[1] == 'v' && (NAME)[2] == 't')) \ - && is_cplus_marker ((NAME)[3])) || ((NAME)[0]=='_' && (NAME)[1]=='_' \ - && (NAME)[2]=='v' && (NAME)[3]=='t' && (NAME)[4]=='_')) - -/* Macro that yields non-zero value iff NAME is the prefix for C++ destructor - names. Note that this macro is g++ specific (FIXME). */ - -#define DESTRUCTOR_PREFIX_P(NAME) \ - ((NAME)[0] == '_' && is_cplus_marker ((NAME)[1]) && (NAME)[2] == '_') - - /* External variables and functions for the objects described above. */ /* This symtab variable specifies the current file for printing source lines */ |