Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [PATCH] Fix build failure with macOS bison
@ 2019-01-07 15:38 John Marshall
  2019-01-07 16:14 ` John Marshall
  0 siblings, 1 reply; 8+ messages in thread
From: John Marshall @ 2019-01-07 15:38 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 4915 bytes --]

Tom Tromey wrote:
> Simon -- I can't readily try this patch on macOS right now, so I was
> hoping you could.

I have independently done the same bisection as in gdb/24060 (should have looked at the list archives more carefully first!), and can confirm that this patch fixes c-exp.y. However the same problem occurs for f-exp.y (and perhaps others).

    John
From gdb-patches-return-153239-listarch-gdb-patches=sources.redhat.com@sourceware.org Mon Jan 07 15:40:37 2019
Return-Path: <gdb-patches-return-153239-listarch-gdb-patches=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-patches@sources.redhat.com
Received: (qmail 13692 invoked by alias); 7 Jan 2019 15:40:37 -0000
Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-patches.sourceware.org>
List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-patches/>
List-Post: <mailto:gdb-patches@sourceware.org>
List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-patches-owner@sourceware.org
Delivered-To: mailing list gdb-patches@sourceware.org
Received: (qmail 13677 invoked by uid 89); 7 Jan 2019 15:40:36 -0000
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 testsºYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1388, closely
X-HELO: gateway30.websitewelcome.com
Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.168.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Jan 2019 15:40:34 +0000
Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4])	by gateway30.websitewelcome.com (Postfix) with ESMTP id ACEAAA133	for <gdb-patches@sourceware.org>; Mon,  7 Jan 2019 09:40:33 -0600 (CST)
Received: from box5379.bluehost.com ([162.241.216.53])	by cmsmtp with SMTP	id gX0zgXtYd2PzOgX0zgCrog; Mon, 07 Jan 2019 09:40:33 -0600
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com;	 sÞfault; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:	References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:	Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:	Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:	List-Subscribe:List-Post:List-Owner:List-Archive;	bh=DGv+TAazXGj19YQ8KHykq7Dw8BHJF/sSjflJ5IbrfcI=; b=yEzKcbafOZ0o1pCcMkVX4HrRDH	y48nq9/uWpGi04wKIHhw4EAUaKkWNaon/ui7ODjjOdczcil6YBTAU8XmvTMwfgdKCzgb2hFj//x62	Flab+bM21mVKfyJBPssfHL1nH;
Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:50688 heloºpiya)	by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)	(Exim 4.91)	(envelope-from <tom@tromey.com>)	id 1ggX0z-001F1n-DM; Mon, 07 Jan 2019 09:40:33 -0600
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Replace make_bpstat_clear_actions_cleanup
References: <20190107124354.17415-1-andrew.burgess@embecosm.com>
Date: Mon, 07 Jan 2019 15:40:00 -0000
In-Reply-To: <20190107124354.17415-1-andrew.burgess@embecosm.com> (Andrew	Burgess's message of "Mon, 7 Jan 2019 12:43:54 +0000")
Message-ID: <87zhsczdan.fsf@tromey.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SW-Source: 2019-01/txt/msg00129.txt.bz2
Content-length: 1345

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> Replace make_bpstat_clear_actions_cleanup with a new class that can
Andrew> perform the cleanup.

Andrew> gdb/ChangeLog:

Andrew> 	* breakpoint.c (bpstat_clear_actions): Rename to...
Andrew> 	(scoped_bpstat_clear_actions::do_bpstat_clear_actions): ...this.
Andrew> 	(bpstat_do_actions): Switch from using
Andrew> 	make_bpstat_clear_actions_cleanup to use
Andrew> 	scoped_bpstat_clear_actions.
Andrew> 	* breakpoint.h (class scoped_bpstat_clear_actions): New.
Andrew> 	* infrun.c (fetch_inferior_event): Switch from using
Andrew> 	make_bpstat_clear_actions_cleanup to use
Andrew> 	scoped_bpstat_clear_actions.
Andrew> 	* top.c (execute_command): Likewise.
Andrew> 	* utils.c (do_bpstat_clear_actions_cleanup): Delete.
Andrew> 	(make_bpstat_clear_actions_cleanup): Delete.
Andrew> 	* utils.h (make_bpstat_clear_actions_cleanup): Delete.

BTW, this is ok.  There's no need to wait on some other series that
hasn't been sent.

Andrew>  void
Andrew> -bpstat_clear_actions (void)
Andrew> +scoped_bpstat_clear_actions::do_bpstat_clear_actions (void)

I looked more closely, and this approach is actually a bit more
"integrated" (not sure what word to use) than mine, as mine left
bpstat_clear_actions as an ordinary function.  So perhaps this is a
better way to go.

Tom


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] Fix build failure with macOS bison
@ 2019-01-06 16:49 Tom Tromey
  2019-01-06 16:50 ` Tom Tromey
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2019-01-06 16:49 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

PR gdb/24060 points out a compilation failure of the C parser when it
is built using the macOS system bison.  The bug is a name clash
between the VARIABLE token name and the VARIABLE enumerator in
ui-out.h.

This patch renames VARIABLE in c-exp.y to avoid the clash.  I chose to
rename this identifier because it was the more localized change.

gdb/ChangeLog
2019-01-06  Tom Tromey  <tom@tromey.com>

	PR gdb/24060:
	* c-exp.y (CONV_VAR): Rename from VARIABLE.
---
 gdb/ChangeLog | 5 +++++
 gdb/c-exp.y   | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 155fe09f37..3d7f6a05b5 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -234,7 +234,7 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
    legal basetypes.  */
 %token SIGNED_KEYWORD LONG SHORT INT_KEYWORD CONST_KEYWORD VOLATILE_KEYWORD DOUBLE_KEYWORD
 
-%token <sval> VARIABLE
+%token <sval> CONV_VAR
 
 %token <opcode> ASSIGN_MODIFY
 
@@ -798,7 +798,7 @@ exp	:	FLOAT
 exp	:	variable
 	;
 
-exp	:	VARIABLE
+exp	:	CONV_VAR
 			{
 			  write_dollar_variable (pstate, $1);
 			}
@@ -2884,7 +2884,7 @@ lex_one_token (struct parser_state *par_state, bool *is_quoted_name)
       }
 
   if (*tokstart == '$')
-    return VARIABLE;
+    return CONV_VAR;
 
   if (parse_completion && *lexptr == '\0')
     saw_name_at_eof = 1;
@@ -3337,7 +3337,7 @@ c_print_token (FILE *file, int type, YYSTYPE value)
       break;
 
     case NSSTRING:
-    case VARIABLE:
+    case CONV_VAR:
       parser_fprintf (file, "sval<%s>", copy_name (value.sval));
       break;
 
-- 
2.17.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-08 17:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 15:38 [PATCH] Fix build failure with macOS bison John Marshall
2019-01-07 16:14 ` John Marshall
2019-01-07 22:09   ` Simon Marchi
2019-01-08  2:00     ` Tom Tromey
2019-01-08 17:46       ` Simon Marchi
  -- strict thread matches above, loose matches on Subject: below --
2019-01-06 16:49 Tom Tromey
2019-01-06 16:50 ` Tom Tromey
2019-01-06 16:53   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox