From patchwork Mon Dec 9 13:05:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36664 Received: (qmail 24614 invoked by alias); 9 Dec 2019 13:05:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 24123 invoked by uid 89); 9 Dec 2019 13:05:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=H*R:U*noreply, Looks X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Dec 2019 13:05:09 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 05FE620307; Mon, 9 Dec 2019 08:05:07 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id CE2C12012A; Mon, 9 Dec 2019 08:05:06 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 9B5A220AF6; Mon, 9 Dec 2019 08:05:06 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Mon, 9 Dec 2019 08:05:06 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Wataru Ashihara , Simon Marchi , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] gdb/darwin-nat.c: Fix template argument for scoped_restore_tmpl X-Gerrit-Change-Id: Ia0202efd34dbce69b6af5d035fa55ed89215138a X-Gerrit-Change-Number: 751 X-Gerrit-ChangeURL: X-Gerrit-Commit: b1f0c0b90bc8e93eb2d8592c675cba018ac50739 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, wataash@wataash.com, simon.marchi@polymtl.ca, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191209130506.9B5A220AF6@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/751 ...................................................................... gdb/darwin-nat.c: Fix template argument for scoped_restore_tmpl This should be the type of startup_with_shell, whose type was changed from int to bool at commit 80fd28264. This fixes the build on macOS: CXX darwin-nat.o In file included from ../../gdb/darwin-nat.c:22: In file included from ../../gdb/top.h:25: In file included from ../../gdb/value.h:23: In file included from ../../gdb/frame.h:72: In file included from ../../gdb/language.h:26: In file included from ../../gdb/symtab.h:33: ../../gdb/gdbsupport/gdb_optional.h:155:19: error: no matching constructor for initialization of 'scoped_restore_tmpl' new (&m_item) T (std::forward(args)...); ^ ~~~~~~~~~~~~~~~~~~~~~~~~ ../../gdb/darwin-nat.c:1995:31: note: in instantiation of function template specialization 'gdb::optional >::emplace' requested here restore_startup_with_shell.emplace (&startup_with_shell, 0); ^ ../../gdb/gdbsupport/scoped_restore.h:69:3: note: candidate constructor template not viable: no known conversion from 'bool *' to 'int *' for 1st argument scoped_restore_tmpl (T *var, T2 value) ^ ../../gdb/gdbsupport/scoped_restore.h:57:3: note: candidate constructor not viable: requires single argument 'var', but 2 arguments were provided scoped_restore_tmpl (T *var) ^ ../../gdb/gdbsupport/scoped_restore.h:76:3: note: candidate constructor not viable: requires single argument 'other', but 2 arguments were provided scoped_restore_tmpl (const scoped_restore_tmpl &other) ^ 1 error generated. gdb/ChangeLog 2019-12-08 Wataru Ashihara * darwin-nat.c (darwin_nat_target::create_inferior): Fix template argument for scoped_restore_tmpl from bool to int. Change-Id: Ia0202efd34dbce69b6af5d035fa55ed89215138a --- M gdb/ChangeLog M gdb/darwin-nat.c 2 files changed, 6 insertions(+), 1 deletion(-) Approvals: Simon Marchi: Looks good to me, approved diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ee45156..9709d0d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-12-08 Wataru Ashihara + + * darwin-nat.c (darwin_nat_target::create_inferior): Fix + template argument for scoped_restore_tmpl from bool to int. + 2019-12-07 Keith Seitz * build-id.c (build_id_bfd_get): Permit bfd_core, too. diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 123d2c0..ecc7fc0 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1985,7 +1985,7 @@ const std::string &allargs, char **env, int from_tty) { - gdb::optional> restore_startup_with_shell; + gdb::optional> restore_startup_with_shell; if (startup_with_shell && may_have_sip ()) {