From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>
Cc: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Remove VEC from breakpoint
Date: Wed, 11 Jul 2018 02:25:00 -0000 [thread overview]
Message-ID: <9589e1bf-479b-b11f-62e4-e7a491664326@simark.ca> (raw)
In-Reply-To: <87a7r1qbs3.fsf@tromey.com>
On 2018-07-09 12:21 AM, Tom Tromey wrote:
> Tom> I'm going to take another attempt at it, using a hack to get the
> Tom> configure logging output into the file that's visible in buildbot,
> Tom> since I didn't see a way to fetch the config.log.
>
> That didn't take long:
>
> https://gdb-build.sergiodj.net/builders/Debian-s390x-native-gdbserver-m64/builds/5859/steps/compile%20gdb/logs/stdio
>
> I don't know what is going on here, but basically the test case passes
> fine in configure, but causes problems in the build.
>
> configure's test is:
>
> struct Bar { virtual ~Bar() {} }; Bar getbar();
> int
> main ()
> {
> const Bar& b = getbar();
> ;
> return 0;
> }
>
> But the real code is:
>
> scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
>
> If you have any ideas, I'd appreciate it. Perhaps it's really some
> different bug. This only seems to affect the s390 builders.
>
> Tom
>
Hi Tom,
I reduced the case to this:
struct scoped_restore_base {};
struct scoped_restore_tmpl : public scoped_restore_base {
~scoped_restore_tmpl() {}
};
void func() {
const scoped_restore_base & save_inferior_ptid = scoped_restore_tmpl();
}
The type of "save_inferior_ptid" seems important. If it's a reference to the
child class, we don't get the warning with g++ 4.9. So your configure test would
need to have that. g++ 4.9 is available in Debian 8, which you can easily run in
a docker container.
root@9305ed73237c:/gdb/gdb# g++ --version
g++ (Debian 4.9.2-10+deb8u1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@9305ed73237c:/gdb/gdb# g++ -std=gnu++11 -Werror -c -o repro.o -Wunused-variable repro2.cpp
repro2.cpp: In function 'void func()':
repro2.cpp:8:31: error: unused variable 'save_inferior_ptid' [-Werror=unused-variable]
const scoped_restore_base & save_inferior_ptid = scoped_restore_tmpl();
^
cc1plus: all warnings being treated as errors
Simon
prev parent reply other threads:[~2018-07-11 2:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 19:23 Tom Tromey
2018-07-03 14:33 ` Andrew Burgess
2018-07-04 4:40 ` Simon Marchi
2018-07-04 5:39 ` Tom Tromey
2018-07-04 17:29 ` Tom Tromey
2018-07-09 4:09 ` Tom Tromey
2018-07-09 4:21 ` Tom Tromey
2018-07-11 2:25 ` 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=9589e1bf-479b-b11f-62e4-e7a491664326@simark.ca \
--to=simark@simark.ca \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).