aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-10-11 14:02:39 +0000
committerDaniel Jacobowitz <drow@false.org>2002-10-11 14:02:39 +0000
commit8343f86c902d0f363da4d59931750352377f96af (patch)
tree3ee82186f5de9ad2f508126bee064e7718f6ad07
parent6d12fc3d08ed2bb837fd2b70916289fa5999363d (diff)
downloadgdb-8343f86c902d0f363da4d59931750352377f96af.zip
gdb-8343f86c902d0f363da4d59931750352377f96af.tar.gz
gdb-8343f86c902d0f363da4d59931750352377f96af.tar.bz2
* c-exp.y (THIS): Delete token and grammar rule.
(yylex): Don't return THIS. * cp-valprint.c (vtbl_ptr_name_old): Delete. (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old. * demangle.c (cplus_markers): Update comment. Put '$' first. Remove CPLUS_MARKER. (_initialize_demangler): Don't call set_cplus_marker_for_demangling. * jv-exp.y (THIS): Delete token and grammar rule. (yylex): Don't return THIS. * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER. * objc-exp.y (THIS): Delete token and grammar rule. (yylex): Don't return THIS. * p-exp.y (yylex): Remove reference to CPLUS_MARKER. * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'. (read_member_functions): Likewise for opname. (read_tilde_fields): Use is_cplus_marker. * defs.h (CPLUS_MARKER): Don't define. * config/tm-sysv4.h (CPLUS_MARKER): Likewise. * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise. * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise. * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise. * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise. * config/i386/tm-i386v4.h: Delete file. * config/djgpp/fnchange.lst: Delete tm-i386v4.h. * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead. * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead. * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead. * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h. * config/i386/i386sco5.mt (TM_FILE): Likewise. * config/i386/i386v4.mt (TM_FILE): Likewise. * config/i386/ncr3000.mt (TM_FILE): Likewise.
-rw-r--r--gdb/ChangeLog36
-rw-r--r--gdb/c-exp.y17
-rw-r--r--gdb/config/djgpp/fnchange.lst1
-rw-r--r--gdb/config/i386/i386gnu.mt2
-rw-r--r--gdb/config/i386/i386sco5.mt2
-rw-r--r--gdb/config/i386/i386v4.mt2
-rw-r--r--gdb/config/i386/ncr3000.mt2
-rw-r--r--gdb/config/i386/tm-i386sol2.h2
-rw-r--r--gdb/config/i386/tm-i386v4.h39
-rw-r--r--gdb/config/i386/tm-i386v42mp.h2
-rw-r--r--gdb/config/i386/tm-ptx.h2
-rw-r--r--gdb/config/i386/xm-i386sco.h5
-rw-r--r--gdb/config/mips/tm-irix3.h5
-rw-r--r--gdb/config/mips/tm-irix6.h5
-rw-r--r--gdb/config/rs6000/tm-rs6000.h5
-rw-r--r--gdb/config/tm-sysv4.h10
-rw-r--r--gdb/cp-valprint.c16
-rw-r--r--gdb/defs.h4
-rw-r--r--gdb/demangle.c31
-rw-r--r--gdb/jv-exp.y16
-rw-r--r--gdb/mips-tdep.c3
-rw-r--r--gdb/objc-exp.y23
-rw-r--r--gdb/p-exp.y3
-rw-r--r--gdb/stabsread.c14
24 files changed, 66 insertions, 181 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 187e37e..77b5fb2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,39 @@
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * cp-valprint.c (vtbl_ptr_name_old): Delete.
+ (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old.
+ * demangle.c (cplus_markers): Update comment. Put '$'
+ first. Remove CPLUS_MARKER.
+ (_initialize_demangler): Don't call set_cplus_marker_for_demangling.
+ * jv-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER.
+ * objc-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * p-exp.y (yylex): Remove reference to CPLUS_MARKER.
+ * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'.
+ (read_member_functions): Likewise for opname.
+ (read_tilde_fields): Use is_cplus_marker.
+
+ * defs.h (CPLUS_MARKER): Don't define.
+ * config/tm-sysv4.h (CPLUS_MARKER): Likewise.
+ * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise.
+ * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise.
+
+ * config/i386/tm-i386v4.h: Delete file.
+ * config/djgpp/fnchange.lst: Delete tm-i386v4.h.
+ * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead.
+ * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h.
+ * config/i386/i386sco5.mt (TM_FILE): Likewise.
+ * config/i386/i386v4.mt (TM_FILE): Likewise.
+ * config/i386/ncr3000.mt (TM_FILE): Likewise.
+
2002-10-10 Marko Mlinar <markom@opencores.org>
* infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C,
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 376f6d5..1f344c4 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -199,7 +199,6 @@ static int parse_number (char *, int, int, YYSTYPE *);
%token <opcode> ASSIGN_MODIFY
/* C++ */
-%token THIS
%token TRUEKEYWORD
%token FALSEKEYWORD
@@ -532,11 +531,6 @@ exp : STRING
;
/* C++. */
-exp : THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
- ;
-
exp : TRUEKEYWORD
{ write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (builtin_type_bool);
@@ -1615,17 +1609,6 @@ yylex ()
{
if (STREQN (tokstart, "true", 4))
return TRUEKEYWORD;
-
- if (STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
}
break;
case 3:
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 0cb63a5..4d9fa83 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -88,7 +88,6 @@
@V@/gdb/config/i386/nm-i386v42mp.h @V@/gdb/config/i386/nm-v42mp.h
@V@/gdb/config/i386/tm-i386mk.h @V@/gdb/config/i386/tm-mk.h
@V@/gdb/config/i386/tm-i386sol2.h @V@/gdb/config/i386/tm-sol2.h
-@V@/gdb/config/i386/tm-i386v4.h @V@/gdb/config/i386/tm-v4.h
@V@/gdb/config/i386/tm-i386v42mp.h @V@/gdb/config/i386/tm-v42mp.h
@V@/gdb/config/i386/xm-i386mach.h @V@/gdb/config/i386/xm-mach.h
@V@/gdb/config/i386/xm-i386mk.h @V@/gdb/config/i386/xm-mk.h
diff --git a/gdb/config/i386/i386gnu.mt b/gdb/config/i386/i386gnu.mt
index dc3edd2..2029e99 100644
--- a/gdb/config/i386/i386gnu.mt
+++ b/gdb/config/i386/i386gnu.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running the GNU Hurd
TDEPFILES= i386-tdep.o i387-tdep.o i386gnu-tdep.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386sco5.mt b/gdb/config/i386/i386sco5.mt
index ace2258..11ab55f 100644
--- a/gdb/config/i386/i386sco5.mt
+++ b/gdb/config/i386/i386sco5.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SCO Open Server 5
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386v4.mt b/gdb/config/i386/i386v4.mt
index c22b675..d1b8c26 100644
--- a/gdb/config/i386/i386v4.mt
+++ b/gdb/config/i386/i386v4.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/ncr3000.mt b/gdb/config/i386/ncr3000.mt
index 11bc474..4773dae 100644
--- a/gdb/config/i386/ncr3000.mt
+++ b/gdb/config/i386/ncr3000.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index 35d63d1..5a79f67 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -21,7 +21,7 @@
#ifndef TM_I386SOL2_H
#define TM_I386SOL2_H 1
-#include "i386/tm-i386v4.h"
+#include "i386/tm-i386.h"
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
and for SunPRO 3.0, N_FUN symbols too. */
diff --git a/gdb/config/i386/tm-i386v4.h b/gdb/config/i386/tm-i386v4.h
deleted file mode 100644
index 9363327..0000000
--- a/gdb/config/i386/tm-i386v4.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Macro definitions for GDB on an Intel i386 running SVR4.
- Copyright 1991, 1994, 1995, 1998, 1999, 2000, 2002
- Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_I386V4_H
-#define TM_I386V4_H 1
-
-/* Pick up most of what we need from the generic i386 target include file. */
-#include "i386/tm-i386.h"
-
-/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
- in identifiers. The default in G++ is to use dots instead, for all SVR4
- systems, so we make that our default also. FIXME: There should be some
- way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
- stashing it in the debugging information as part of the name of an
- invented symbol ("gcc_cplus_marker$" for example). */
-
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
-#endif /* ifndef TM_I386V4_H */
diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h
index 5671e42..527fdbb 100644
--- a/gdb/config/i386/tm-i386v42mp.h
+++ b/gdb/config/i386/tm-i386v42mp.h
@@ -24,7 +24,7 @@
/* pick up more generic x86 sysv4 stuff */
-#include "i386/tm-i386v4.h"
+#include "i386/tm-i386.h"
/* define to select for other sysv4.2mp weirdness (see procfs.c) */
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
index 8d773c8..2b7a86c 100644
--- a/gdb/config/i386/tm-ptx.h
+++ b/gdb/config/i386/tm-ptx.h
@@ -30,7 +30,7 @@
#include <sys/reg.h>
#ifdef SEQUENT_PTX4
-#include "i386/tm-i386v4.h"
+#include "i386/tm-i386.h"
#else /* !SEQUENT_PTX4 */
#include "i386/tm-i386.h"
#endif
diff --git a/gdb/config/i386/xm-i386sco.h b/gdb/config/i386/xm-i386sco.h
index 920ebbb..72552c9 100644
--- a/gdb/config/i386/xm-i386sco.h
+++ b/gdb/config/i386/xm-i386sco.h
@@ -33,8 +33,3 @@
GDB does not currently support the termio/job control combination. */
#undef HAVE_TERMIO
#define HAVE_TERMIOS
-
-/* SCO's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
diff --git a/gdb/config/mips/tm-irix3.h b/gdb/config/mips/tm-irix3.h
index 11859e5..c298a39 100644
--- a/gdb/config/mips/tm-irix3.h
+++ b/gdb/config/mips/tm-irix3.h
@@ -21,11 +21,6 @@
#include "mips/tm-bigmips.h"
-/* SGI's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
/* Redefine register numbers for SGI. */
#undef NUM_REGS
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 58b97e1..ce9c226 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -22,11 +22,6 @@
#include "mips/tm-bigmips64.h"
#include "solib.h"
-/* SGI's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
/* Redefine register numbers for SGI. */
#undef NUM_REGS
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index ea0c073..478e9bd 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -27,11 +27,6 @@
#define TEXT_SEGMENT_BASE 0x10000000
-/* AIX's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
/* Return whether PC in function NAME is in code that should be skipped when
single-stepping. */
diff --git a/gdb/config/tm-sysv4.h b/gdb/config/tm-sysv4.h
index 35b95eb..9a39af2 100644
--- a/gdb/config/tm-sysv4.h
+++ b/gdb/config/tm-sysv4.h
@@ -35,13 +35,3 @@ extern int in_plt_section (CORE_ADDR, char *);
where the function itself actually starts. If not, return 0. */
#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc)
-
-/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
- in identifiers. The default in G++ is to use dots instead, for all SVR4
- systems, so we make that our default also. FIXME: There should be some
- way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
- stashing it in the debugging information as part of the name of an
- invented symbol ("gcc_cplus_marker$" for example). */
-
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 28dc025..f362d84 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -161,21 +161,13 @@ cp_print_class_method (char *valaddr,
}
}
-/* This was what it was for gcc 2.4.5 and earlier. */
-static const char vtbl_ptr_name_old[] =
-{
- CPLUS_MARKER, 'v', 't', 'b', 'l', '_', 'p', 't', 'r', '_',
- 't', 'y', 'p', 'e', 0
-};
-
-/* It was changed to this after 2.4.5. */
+/* GCC versions after 2.4.5 use this. */
const char vtbl_ptr_name[] = "__vtbl_ptr_type";
-/* HP aCC uses different names */
+/* HP aCC uses different names. */
const char hpacc_vtbl_ptr_name[] = "__vfp";
const char hpacc_vtbl_ptr_type_name[] = "__vftyp";
-
/* Return truth value for assertion that TYPE is of the type
"pointer to virtual function". */
@@ -184,9 +176,7 @@ cp_is_vtbl_ptr_type (struct type *type)
{
char *typename = type_name_no_tag (type);
- return (typename != NULL
- && (STREQ (typename, vtbl_ptr_name)
- || STREQ (typename, vtbl_ptr_name_old)));
+ return (typename != NULL && !strcmp (typename, vtbl_ptr_name));
}
/* Return truth value for the assertion that TYPE is of the type
diff --git a/gdb/defs.h b/gdb/defs.h
index d13cd69..7491727 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -157,10 +157,6 @@ typedef bfd_vma CORE_ADDR;
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
-/* The character GNU C++ uses to build identifiers that must be unique from
- the program's identifiers (such as $this and $$vptr). */
-#define CPLUS_MARKER '$' /* May be overridden to '.' for SysV */
-
/* Check if a character is one of the commonly used C++ marker characters. */
extern int is_cplus_marker (int);
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 1fd69be..2b9579b 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -150,24 +150,18 @@ set_demangling_style (char *style)
set_demangling_command ((char *) NULL, 0, (struct cmd_list_element *) NULL);
}
-/* In order to allow a single demangler executable to demangle strings
- using various common values of CPLUS_MARKER, as well as any specific
- one set at compile time, we maintain a string containing all the
- commonly used ones, and check to see if the marker we are looking for
- is in that string. CPLUS_MARKER is usually '$' on systems where the
- assembler can deal with that. Where the assembler can't, it's usually
- '.' (but on many systems '.' is used for other things). We put the
- current defined CPLUS_MARKER first (which defaults to '$'), followed
- by the next most common value, followed by an explicit '$' in case
- the value of CPLUS_MARKER is not '$'.
-
- We could avoid this if we could just get g++ to tell us what the actual
- cplus marker character is as part of the debug information, perhaps by
- ensuring that it is the character that terminates the gcc<n>_compiled
- marker symbol (FIXME). */
-
-static char cplus_markers[] =
-{CPLUS_MARKER, '.', '$', '\0'};
+/* G++ uses a special character to indicate certain internal names. Which
+ character it is depends on the platform:
+ - Usually '$' on systems where the assembler will accept that
+ - Usually '.' otherwise (this includes most sysv4-like systems and most
+ ELF targets)
+ - Occasionally '_' if neither of the above is usable
+
+ We check '$' first because it is the safest, and '.' often has another
+ meaning. We don't currently try to handle '_' because the precise forms
+ of the names are different on those targets. */
+
+static char cplus_markers[] = {'$', '.', '\0'};
int
is_cplus_marker (int c)
@@ -204,5 +198,4 @@ Use `set demangle-style' without arguments for a list of demangling styles.",
/* Set the default demangling style chosen at compilation time. */
set_demangling_style (DEFAULT_DEMANGLING_STYLE);
- set_cplus_marker_for_demangling (CPLUS_MARKER);
}
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 70c228b..b4ae340 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -179,7 +179,7 @@ static int parse_number (char *, int, int, YYSTYPE *);
%token <opcode> ASSIGN_MODIFY
-%token THIS SUPER NEW
+%token SUPER NEW
%left ','
%right '=' ASSIGN_MODIFY
@@ -365,9 +365,6 @@ Primary:
PrimaryNoNewArray:
Literal
-| THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
| '(' Expression ')'
| ClassInstanceCreationExpression
| FieldAccess
@@ -1167,17 +1164,6 @@ yylex ()
yylval.lval = 1;
return BOOLEAN_LITERAL;
}
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
break;
case 3:
if (STREQN (tokstart, "int", 3))
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index fd61c5b..3908606 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -6194,9 +6194,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: CAUSE_REGNUM = %d\n",
CAUSE_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: CPLUS_MARKER = %c\n",
- CPLUS_MARKER);
- fprintf_unfiltered (file,
"mips_dump_tdep: DO_REGISTERS_INFO # %s\n",
XSTRING (DO_REGISTERS_INFO));
fprintf_unfiltered (file,
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 54b99b0..2ccc882 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -203,9 +203,6 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *));
%token <opcode> ASSIGN_MODIFY
-/* C++ */
-%token THIS
-
%left ','
%left ABOVE_COMMA
%right '=' ASSIGN_MODIFY
@@ -613,14 +610,6 @@ exp : NSSTRING /* ObjC NextStep NSString constant
write_exp_elt_opcode (OP_NSSTRING); }
;
-/* C++. */
-exp : THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
- ;
-
-/* end of C++. */
-
block : BLOCKNAME
{
if ($1.sym != 0)
@@ -1631,18 +1620,6 @@ yylex ()
return ENUM;
if (STREQN (tokstart, "long", 4))
return LONG;
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] = {
- CPLUS_MARKER, 't', 'h', 'i', 's', '\0'
- };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
break;
case 3:
if (STREQN (tokstart, "int", 3))
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index f0939e7..4dc99be 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1358,8 +1358,7 @@ yylex ()
{
/* here we search for 'this' like
inserted in FPC stabs debug info */
- static const char this_name[] =
- { /* CPLUS_MARKER,*/ 't', 'h', 'i', 's', '\0' };
+ static const char this_name[] = "this";
if (lookup_symbol (this_name, expression_context_block,
VAR_NAMESPACE, (int *) NULL,
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4697b40..00634ac 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -185,10 +185,8 @@ resolve_symbol_reference (struct objfile *, struct symbol *, char *);
void stabsread_clear_cache (void);
-static const char vptr_name[] =
-{'_', 'v', 'p', 't', 'r', CPLUS_MARKER, '\0'};
-static const char vb_name[] =
-{'_', 'v', 'b', CPLUS_MARKER, '\0'};
+static const char vptr_name[] = "_vptr$";
+static const char vb_name[] = "_vb$";
/* Define this as 1 if a pcc declaration of a char or short argument
gives the correct address. Otherwise assume pcc gives the
@@ -3179,8 +3177,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
/* This lets the user type "break operator+".
We could just put in "+" as the name, but that wouldn't
work for "*". */
- static char opname[32] =
- {'o', 'p', CPLUS_MARKER};
+ static char opname[32] = "op$";
char *o = opname + 3;
/* Skip past '::'. */
@@ -4138,8 +4135,9 @@ read_tilde_fields (struct field_info *fip, char **pp, struct type *type,
i >= TYPE_N_BASECLASSES (t);
--i)
{
- if (!strncmp (TYPE_FIELD_NAME (t, i), vptr_name,
- sizeof (vptr_name) - 1))
+ char *name = TYPE_FIELD_NAME (t, i);
+ if (!strncmp (name, vptr_name, sizeof (vptr_name) - 2)
+ && is_cplus_marker (name[sizeof (vptr_name) - 1]))
{
TYPE_VPTR_FIELDNO (type) = i;
goto gotit;