aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-02-16 06:14:15 +0000
committerFred Fish <fnf@specifix.com>1996-02-16 06:14:15 +0000
commit81afee37d0a016cd3e671693c165916893ac3e60 (patch)
tree43af22fde990502fd3478fc11b354c1f2daaee04 /gdb/symtab.h
parent14b22711be24b3832e3282347207467471cb42ab (diff)
downloadgdb-81afee37d0a016cd3e671693c165916893ac3e60.zip
gdb-81afee37d0a016cd3e671693c165916893ac3e60.tar.gz
gdb-81afee37d0a016cd3e671693c165916893ac3e60.tar.bz2
* demangle.c (is_cplus_marker): New function, checks if a
character is one of the commonly used C++ marker characters. * defs.h (is_cplus_marker): Add prototype. * c-typeprint.c (c_type_print_base), ch-lang.c (chill_demangle), cp-valprint.c (cp_print_class_method), mdebugread.c (parse_symbol), stabsread.c (define_symbol, read_member_functions, read_struct_fields), symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P), values.c (vb_match): Use is_cplus_marker instead of comparison with CPLUS_MARKER.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 0a20db5..49b0c1a 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -931,7 +931,7 @@ struct partial_symtab
Note that this macro is g++ specific (FIXME). */
#define OPNAME_PREFIX_P(NAME) \
- ((NAME)[0] == 'o' && (NAME)[1] == 'p' && (NAME)[2] == CPLUS_MARKER)
+ ((NAME)[0] == 'o' && (NAME)[1] == 'p' && is_cplus_marker ((NAME)[2]))
/* Macro that yields non-zero value iff NAME is the prefix for C++ vtbl
names. Note that this macro is g++ specific (FIXME).
@@ -939,15 +939,16 @@ struct partial_symtab
style, using thunks (where '$' is really CPLUS_MARKER). */
#define VTBL_PREFIX_P(NAME) \
- ((NAME)[3] == CPLUS_MARKER && (NAME)[0] == '_' \
+ ((NAME)[0] == '_' \
&& (((NAME)[1] == 'V' && (NAME)[2] == 'T') \
- || ((NAME)[1] == 'v' && (NAME)[2] == 't')))
+ || ((NAME)[1] == 'v' && (NAME)[2] == 't')) \
+ && is_cplus_marker ((NAME)[3]))
/* 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] == '_' && (NAME)[1] == CPLUS_MARKER && (NAME)[2] == '_')
+ ((NAME)[0] == '_' && is_cplus_marker ((NAME)[1]) && (NAME)[2] == '_')
/* External variables and functions for the objects described above. */
@@ -964,6 +965,10 @@ extern int current_source_line;
extern struct objfile *current_objfile;
+/* True if we are nested inside psymtab_to_symtab. */
+
+extern int currently_reading_symtab;
+
/* From utils.c. */
extern int demangle;
extern int asm_demangle;