diff options
author | Daniel Jacobowitz <dan@debian.org> | 2002-10-11 14:02:39 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2002-10-11 14:02:39 +0000 |
commit | cc12003c74db3b30050431fd27b58518445cd9f9 (patch) | |
tree | 22d2775fcc203a0d8c05a762492caf6544863c4d | |
parent | 0c9646070c46e5fdb1be65e96ef0fcb9f66780c0 (diff) | |
download | gdb-cc12003c74db3b30050431fd27b58518445cd9f9.tar.gz |
* 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/ChangeLog | 36 | ||||
-rw-r--r-- | gdb/c-exp.y | 17 | ||||
-rw-r--r-- | gdb/config/djgpp/fnchange.lst | 1 | ||||
-rw-r--r-- | gdb/config/i386/i386gnu.mt | 2 | ||||
-rw-r--r-- | gdb/config/i386/i386sco5.mt | 2 | ||||
-rw-r--r-- | gdb/config/i386/i386v4.mt | 2 | ||||
-rw-r--r-- | gdb/config/i386/ncr3000.mt | 2 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386sol2.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386v4.h | 39 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386v42mp.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/tm-ptx.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/xm-i386sco.h | 5 | ||||
-rw-r--r-- | gdb/config/mips/tm-irix3.h | 5 | ||||
-rw-r--r-- | gdb/config/mips/tm-irix6.h | 5 | ||||
-rw-r--r-- | gdb/config/rs6000/tm-rs6000.h | 5 | ||||
-rw-r--r-- | gdb/config/tm-sysv4.h | 10 | ||||
-rw-r--r-- | gdb/cp-valprint.c | 16 | ||||
-rw-r--r-- | gdb/defs.h | 4 | ||||
-rw-r--r-- | gdb/demangle.c | 31 | ||||
-rw-r--r-- | gdb/jv-exp.y | 16 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 3 | ||||
-rw-r--r-- | gdb/objc-exp.y | 23 | ||||
-rw-r--r-- | gdb/p-exp.y | 3 | ||||
-rw-r--r-- | gdb/stabsread.c | 14 |
24 files changed, 66 insertions, 181 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 187e37e5cbb..77b5fb20c1f 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 376f6d56370..1f344c47b7b 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 0cb63a5d9af..4d9fa8334cd 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 dc3edd2dbb2..2029e99bbfc 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 ace2258a91f..11ab55f2c2f 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 c22b6755985..d1b8c26726c 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 11bc47426e6..4773daec1b6 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 35d63d16865..5a79f67dabc 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 9363327fdb7..00000000000 --- 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 5671e42944c..527fdbb1226 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 8d773c8c292..2b7a86c74c3 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 920ebbb3c4d..72552c93341 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 11859e59a5d..c298a391f80 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 58b97e178b2..ce9c2261854 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 ea0c0734f30..478e9bd164b 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 35b95eb71f8..9a39af20d83 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 28dc0259c24..f362d847536 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 d13cd699b21..7491727993c 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 1fd69be4c58..2b9579bc59c 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 70c228b9575..b4ae3401ea4 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 fd61c5ba49d..39086066332 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 54b99b00610..2ccc8824455 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 f0939e7bbbf..4dc99be8ce4 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 4697b4067e7..00634ac964e 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; |