From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 551D63857BA4 for ; Fri, 15 Sep 2023 16:05:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 551D63857BA4 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=lancelotsix.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lancelotsix.com Received: from octopus (cust120-dsl54.idnet.net [212.69.54.120]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 07D0E80910; Fri, 15 Sep 2023 16:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lancelotsix.com; s=2021; t=1694793899; bh=5RkE8zqylyc3v1npSe5rQ6Nzl6hemMAK0OnwvMoZiok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BguM3cvtn2YeTIZZ72c5hP5ezcLbGVbD0RlIzR8uOi9N+8dIzoIvodkVrwJ8u5429 gwcyckYLHdrnQr39s+Q+ru1Mq2QeCQ843vlGXgHsoPpl9mMHBkKVmV3W/hRJQAT0g/ Ms9VBWh1TkAdeWmFFF9pEcZufgKrrsHugwVwfIh4+ox5gQfPXsRBJKMGSrsQ0zuQOQ 6PGksu6db1TCxySDF3iDPSaRqgE2tYur8Hqkp9I4Tvat/87wUvTjg7gVr1zsDJyzQ5 at04VwF4idXeFFKnppzCw08GVDROcRwScZbq/+9Lm4yncmgVDkkER90q2pJUm5ApQ8 9ND6OPswDJdsg== Date: Fri, 15 Sep 2023 17:04:54 +0100 From: Lancelot SIX To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 3/3] gdb/amdgpu: add precise-memory support Message-ID: <20230915160454.qoc3pjpl5fyxgz45@octopus> References: <20230915145249.22318-1-simon.marchi@efficios.com> <20230915145249.22318-3-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230915145249.22318-3-simon.marchi@efficios.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (lndn.lancelotsix.com [0.0.0.0]); Fri, 15 Sep 2023 16:04:59 +0000 (UTC) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Simon, It looks like your latest change is not c++11 compliant (see below). I do have a WIP branch to bump the C++ version to C++17 (users/lsix/try-c++17). Maybe it's time I write proper commit messages and send this as RFC, see if there is a concensis to allow c++17. > diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c > index 22c269b7992c..507824decf8d 100644 > --- a/gdb/amd-dbgapi-target.c > +++ b/gdb/amd-dbgapi-target.c > @@ -116,8 +117,9 @@ get_amd_dbgapi_target_inferior_created_observer_token () > > struct amd_dbgapi_inferior_info > { > - explicit amd_dbgapi_inferior_info (inferior *inf) > - : inf (inf) > + explicit amd_dbgapi_inferior_info (inferior *inf, > + bool precise_memory_requested = false) > + : inf {inf}, precise_memory {precise_memory_requested} > {} If I build using -std=c++11 I get the following error: ../../gdb/amd-dbgapi-target.c: In constructor ‘amd_dbgapi_inferior_info::amd_dbgapi_inferior_info(inferior*, bool)’: ../../gdb/amd-dbgapi-target.c:122:18: error: no matching function for call to ‘amd_dbgapi_inferior_info::::._anon_207()’ 122 | : inf {inf}, precise_memory {precise_memory_requested} | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../gdb/amd-dbgapi-target.c:145:3: note: candidate: ‘amd_dbgapi_inferior_info::::()’ 145 | { | ^ In c++17 mode, it works fine though… Moving the initialization in the ctor's body would solve the issue explicit amd_dbgapi_inferior_info (inferior *inf, bool precise_memory_requested = false) : inf {inf} { precise_memory.requested = precise_memory_requested; } The alternative would be to name amd_dbgapi_inferior_info::precise_memory's type and give it a ctor. Best, Lancelot. > > /* Backlink to inferior. */