aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
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/stabsread.c
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/stabsread.c')
-rw-r--r--gdb/stabsread.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4ea4ba3..dd0373b 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1,5 +1,5 @@
/* Support routines for decoding "stabs" debugging information format.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
Free Software Foundation, Inc.
This file is part of GDB.
@@ -565,7 +565,7 @@ define_symbol (valu, string, desc, type, objfile)
SYMBOL_LINE(sym) = 0; /* unknown */
}
- if (string[0] == CPLUS_MARKER)
+ if (is_cplus_marker (string[0]))
{
/* Special GNU C++ names. */
switch (string[1])
@@ -2000,7 +2000,7 @@ read_member_functions (fip, pp, type, objfile)
make_cleanup (free, new_fnlist);
memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
- if ((*pp)[0] == 'o' && (*pp)[1] == 'p' && (*pp)[2] == CPLUS_MARKER)
+ if ((*pp)[0] == 'o' && (*pp)[1] == 'p' && is_cplus_marker ((*pp)[2]))
{
/* This is a completely wierd case. In order to stuff in the
names that might contain colons (the usual name delimiter),
@@ -2535,12 +2535,9 @@ read_struct_fields (fip, pp, type, objfile)
/* If is starts with CPLUS_MARKER it is a special abbreviation,
unless the CPLUS_MARKER is followed by an underscore, in
which case it is just the name of an anonymous type, which we
- should handle like any other type name. We accept either '$'
- or '.', because a field name can never contain one of these
- characters except as a CPLUS_MARKER (we probably should be
- doing that in most parts of GDB). */
+ should handle like any other type name. */
- if ((*p == '$' || *p == '.') && p[1] != '_')
+ if (is_cplus_marker (p[0]) && p[1] != '_')
{
if (!read_cpp_abbrev (fip, pp, type, objfile))
return 0;