This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH, RFA] YACC parser symbold renaming
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: gdb-patches at sourceware dot org
- Date: Mon, 9 Apr 2012 15:31:19 +0200 (CEST)
- Subject: [PATCH, RFA] YACC parser symbold renaming
I submitted this a couple of months ago to account for the fact that
the OpenBSD yacc uses some additional symbols that conflict with our
usage of multiple parsers in GDB. Joel approved it, but Tom suggested
using the -p option. I now looked at adding the necessary Makefile
voodoo to do that. This caused me to notice that ada-exp.y actually
relies on the renaming macros to wrap ada_parse(). This can probably
be fixed, but I'd really like to fix this bug since it makes gdb crash
hard on a lot of C++ code.
ok?
2012-04-12 Mark Kettenis <kettenis@gnu.org>
* ada-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* c-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* cp-name-parser.y (yyss, yysslim, yyssp, yystacksize, yyvs)
(yyvsp): New defines.
* f-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* jv-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* m2-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* objc-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* p-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
Index: ada-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/ada-exp.y,v
retrieving revision 1.48
diff -u -p -r1.48 ada-exp.y
--- ada-exp.y 29 Mar 2012 18:23:00 -0000 1.48
+++ ada-exp.y 9 Apr 2012 13:07:11 -0000
@@ -94,6 +94,12 @@
#define yytoks ada_toks /* With YYDEBUG defined */
#define yyname ada_name /* With YYDEBUG defined */
#define yyrule ada_rule /* With YYDEBUG defined */
+#define yyss ada_yyss
+#define yysslim ada_yysslim
+#define yyssp ada_yyssp
+#define yystacksize ada_yystacksize
+#define yyvs ada_yyvs
+#define yyvsp ada_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
Index: c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.87
diff -u -p -r1.87 c-exp.y
--- c-exp.y 11 Jan 2012 10:34:20 -0000 1.87
+++ c-exp.y 9 Apr 2012 13:07:12 -0000
@@ -103,6 +103,12 @@
#define yygindex c_yygindex
#define yytable c_yytable
#define yycheck c_yycheck
+#define yyss c_yyss
+#define yysslim c_yysslim
+#define yyssp c_yyssp
+#define yystacksize c_yystacksize
+#define yyvs c_yyvs
+#define yyvsp c_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
Index: cp-name-parser.y
===================================================================
RCS file: /cvs/src/src/gdb/cp-name-parser.y,v
retrieving revision 1.25
diff -u -p -r1.25 cp-name-parser.y
--- cp-name-parser.y 10 Jan 2012 19:29:12 -0000 1.25
+++ cp-name-parser.y 9 Apr 2012 13:07:13 -0000
@@ -170,6 +170,12 @@ static struct demangle_component *d_bina
#define yygindex cpname_yygindex
#define yytable cpname_yytable
#define yycheck cpname_yycheck
+#define yyss cpname_yyss
+#define yysslim cpname_yysslim
+#define yyssp cpname_yyssp
+#define yystacksize cpname_yystacksize
+#define yyvs cpname_yyvs
+#define yyvsp cpname_yyvsp
int yyparse (void);
static int yylex (void);
Index: f-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/f-exp.y,v
retrieving revision 1.41
diff -u -p -r1.41 f-exp.y
--- f-exp.y 16 Jan 2012 21:03:36 -0000 1.41
+++ f-exp.y 9 Apr 2012 13:07:13 -0000
@@ -105,6 +105,12 @@
#define yygindex f_yygindex
#define yytable f_yytable
#define yycheck f_yycheck
+#define yyss f_yyss
+#define yysslim f_yysslim
+#define yyssp f_yyssp
+#define yystacksize f_yystacksize
+#define yyvs f_yyvs
+#define yyvsp f_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
Index: jv-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/jv-exp.y,v
retrieving revision 1.43
diff -u -p -r1.43 jv-exp.y
--- jv-exp.y 4 Jan 2012 08:17:05 -0000 1.43
+++ jv-exp.y 9 Apr 2012 13:07:13 -0000
@@ -98,6 +98,12 @@
#define yygindex java_yygindex
#define yytable java_yytable
#define yycheck java_yycheck
+#define yyss java_yyss
+#define yysslim java_yysslim
+#define yyssp java_yyssp
+#define yystacksize java_yystacksize
+#define yyvs java_yyvs
+#define yyvsp java_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
Index: m2-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/m2-exp.y,v
retrieving revision 1.39
diff -u -p -r1.39 m2-exp.y
--- m2-exp.y 17 Jan 2012 00:06:47 -0000 1.39
+++ m2-exp.y 9 Apr 2012 13:07:14 -0000
@@ -100,6 +100,12 @@
#define yygindex m2_yygindex
#define yytable m2_yytable
#define yycheck m2_yycheck
+#define yyss m2_yyss
+#define yysslim m2_yysslim
+#define yyssp m2_yyssp
+#define yystacksize m2_yystacksize
+#define yyvs m2_yyvs
+#define yyvsp m2_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
Index: objc-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/objc-exp.y,v
retrieving revision 1.48
diff -u -p -r1.48 objc-exp.y
--- objc-exp.y 16 Jan 2012 21:03:36 -0000 1.48
+++ objc-exp.y 9 Apr 2012 13:07:14 -0000
@@ -102,6 +102,12 @@
#define yygindex objc_yygindex
#define yytable objc_yytable
#define yycheck objc_yycheck
+#define yyss objc_yyss
+#define yysslim objc_yysslim
+#define yyssp objc_yyssp
+#define yystacksize objc_yystacksize
+#define yyvs objc_yyvs
+#define yyvsp objc_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 0 /* Default to no yydebug support. */
Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.63
diff -u -p -r1.63 p-exp.y
--- p-exp.y 7 Feb 2012 04:48:21 -0000 1.63
+++ p-exp.y 9 Apr 2012 13:07:15 -0000
@@ -105,6 +105,12 @@
#define yygindex pascal_yygindex
#define yytable pascal_yytable
#define yycheck pascal_yycheck
+#define yyss pascal_yyss
+#define yysslim pascal_yysslim
+#define yyssp pascal_yyssp
+#define yystacksize pascal_yystacksize
+#define yyvs pascal_yyvs
+#define yyvsp pascal_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */