From: Simon Marchi <simark@simark.ca>
To: gdb-buildbot@sergiodj.net, gdb-patches@sourceware.org,
Simon Marchi <simon.marchi@efficios.com>
Subject: Re: Breakage on builder NetBSD-x86_64-m64, revision beadd3e84ed8e652015f07eb4734a6d3b17e79cb
Date: Mon, 26 Aug 2019 01:34:00 -0000 [thread overview]
Message-ID: <d713ff31-ab24-f8b8-f32c-460bcfdfd92e@simark.ca> (raw)
In-Reply-To: <E1i21CQ-0002ho-Vk@gdb-buildbot.osci.io>
On 2019-08-25 6:41 p.m., gdb-buildbot@sergiodj.net wrote:
> Unfortunately it seems that there is a breakage on GDB.
>
> Commit title: 'dwarf2read: replace gdb::optional<bool> with enum'
> Revision: beadd3e84ed8e652015f07eb4734a6d3b17e79cb
>
> You can find more details below:
I pushed the following patch to try to fix this.
From 23c13d42999cdcf9d224f089891fd3f3c8bdc6aa Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@efficios.com>
Date: Sun, 25 Aug 2019 21:30:02 -0400
Subject: [PATCH] dwarf2read: fix compilation issue with gcc 4.8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc 4.8 (and probably other versions too) doesn't like that the local
variable symbol_linkage has the same name as the enum class defined in
the same context:
CXX dwarf2read.o
/home/smarchi/src/binutils-gdb/gdb/dwarf2read.c: In member function âdwarf2_per_cu_data* dw2_debug_names_iterator::next()â:
/home/smarchi/src/binutils-gdb/gdb/dwarf2read.c:5850:22: error: âsymbol_linkageâ is not a class, namespace, or enumeration
} symbol_linkage = symbol_linkage::unknown;
^
Rename the local variable to avoid this.
This problem was originally reported with the Netbsd builder on the
buildbot, which uses gcc 5.5, I believe. I am not able to test it on
that builder right now, but chances are that the fix will work there
too.
gdb/ChangeLog:
* dwarf2read.c (dw2_debug_names_iterator::next): Rename local
variable symbol_linkage to symbol_linkage_.
---
gdb/ChangeLog | 5 +++++
gdb/dwarf2read.c | 11 ++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5f64ca6d4a94..d4b1e539c392 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-25 Simon Marchi <simon.marchi@efficios.com>
+
+ * dwarf2read.c (dw2_debug_names_iterator::next): Rename local
+ variable symbol_linkage to symbol_linkage_.
+
2019-08-25 Simon Marchi <simon.marchi@efficios.com>
* dwarf2read.c (dw2_debug_names_iterator::next): Use enum to
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a0b989fd0c2e..af4af195a092 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -5847,7 +5847,7 @@ dw2_debug_names_iterator::next ()
unknown,
static_,
extern_,
- } symbol_linkage = symbol_linkage::unknown;
+ } symbol_linkage_ = symbol_linkage::unknown;
dwarf2_per_cu_data *per_cu = NULL;
for (const mapped_debug_names::index_val::attr &attr : indexval.attr_vec)
{
@@ -5899,12 +5899,12 @@ dw2_debug_names_iterator::next ()
case DW_IDX_GNU_internal:
if (!m_map.augmentation_is_gdb)
break;
- symbol_linkage = symbol_linkage::static_;
+ symbol_linkage_ = symbol_linkage::static_;
break;
case DW_IDX_GNU_external:
if (!m_map.augmentation_is_gdb)
break;
- symbol_linkage = symbol_linkage::extern_;
+ symbol_linkage_ = symbol_linkage::extern_;
break;
}
}
@@ -5914,10 +5914,11 @@ dw2_debug_names_iterator::next ()
goto again;
/* Check static vs global. */
- if (symbol_linkage != symbol_linkage::unknown && m_block_index.has_value ())
+ if (symbol_linkage_ != symbol_linkage::unknown && m_block_index.has_value ())
{
const bool want_static = *m_block_index == STATIC_BLOCK;
- const bool symbol_is_static = symbol_linkage == symbol_linkage::static_;
+ const bool symbol_is_static =
+ symbol_linkage_ == symbol_linkage::static_;
if (want_static != symbol_is_static)
goto again;
}
--
2.23.0
prev parent reply other threads:[~2019-08-26 1:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 22:41 Oh dear. I regret to inform you that commit beadd3e84ed8e652015f07eb4734a6d3b17e79cb might be unfortunate gdb-buildbot
2019-08-25 22:41 ` Breakage on builder NetBSD-x86_64-m64, revision beadd3e84ed8e652015f07eb4734a6d3b17e79cb gdb-buildbot
2019-08-26 1:34 ` Simon Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d713ff31-ab24-f8b8-f32c-460bcfdfd92e@simark.ca \
--to=simark@simark.ca \
--cc=gdb-buildbot@sergiodj.net \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox