From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lEEvEMSABGXCvhYAWB0awg (envelope-from ) for ; Fri, 15 Sep 2023 12:05:24 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=sKRjJ/+D; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 39A3B1E0C3; Fri, 15 Sep 2023 12:05:24 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2D2CB1E028 for ; Fri, 15 Sep 2023 12:05:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 951A33857C71 for ; Fri, 15 Sep 2023 16:05:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 951A33857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694793921; bh=0H5dsHnqxGjLAGeLJXYWkIu08sN+8WgSUGelDW+vdDM=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=sKRjJ/+DfxZOvwM6l1hh1Qz5w5QK308+1u0hXTw64K3WNw7noP6eAfGQFvyCxZo8t 1Mev2rbsxXUV8SZQjefdpY5mCXg69m32rvGx+krc3Z3Sp9LL7sTmGuJAJAVnKaBAyG F5PLBTYS0Vl7+2XnJcIsqNoDHQAvQhvMLlUByyxo= 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 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) Date: Fri, 15 Sep 2023 17:04:54 +0100 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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. */