From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id My5sM1tdhmAiWwAAWB0awg (envelope-from ) for ; Mon, 26 Apr 2021 02:27:39 -0400 Received: by simark.ca (Postfix, from userid 112) id BD1791F11C; Mon, 26 Apr 2021 02:27:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C6A411E54D for ; Mon, 26 Apr 2021 02:27:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0C21393C877; Mon, 26 Apr 2021 06:27:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0C21393C877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619418457; bh=XSv62YkgpvzXsLi/pmZX6Fh0kK8ltgp4+9RFPbgi0Ow=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=eypdqNWqDQqzEVY1M9IL42XfqUtGqB8sZoAjxeWtldD43DJdILAT7jlf6v7tHreqe YiLBBypVVVHbKWTNjakWdmLs77cSfWQTprMid9OeWZ7cGdWb+pHXh4vF08t4byrgqp FQdtjrK3JcFh0FtAnA0RsNdfQTfHnomXjgQdrYDs= Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 059B9385803F for ; Mon, 26 Apr 2021 06:27:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 059B9385803F Date: Mon, 26 Apr 2021 07:27:31 +0100 To: Simon Marchi Subject: Re: [PATCH] gdb: fix sparc build failure of linux-nat Message-ID: <20210426072731.0960126d@sf> In-Reply-To: <8c8e919b-e886-3fdf-1370-01fd3d74cb12@polymtl.ca> References: <20210425200324.1953421-1-slyfox@gentoo.org> <8c8e919b-e886-3fdf-1370-01fd3d74cb12@polymtl.ca> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergei Trofimovich via Gdb-patches Reply-To: Sergei Trofimovich Cc: Sergei Trofimovich , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Sun, 25 Apr 2021 19:55:53 -0400 Simon Marchi wrote: > On 2021-04-25 4:03 p.m., Sergei Trofimovich via Gdb-patches wrote: > > From: Sergei Trofimovich > > > > On sparc build failed as: > > > > ``` > > gdb/sparc-linux-nat.c: In member function > > 'virtual void sparc_linux_nat_target::fetch_registers(regcache*, int)': > > gdb/sparc-linux-nat.c:36:37: > > error: cannot convert 'regcache*' to 'process_stratum_target*' > > 36 | { sparc_fetch_inferior_registers (regcache, regnum); } > > | ^~~~~~~~ > > | | > > | regcache* > > ``` > > > > The fix adopts gdb/sparc-nat.h API change in d1e93af64a6 > > ("gdb: set current thread in sparc_{fetch,collect}_inferior_registers"). > > > > gdb/ChangeLog: > > > > * sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build > > by passing `process_stratum_target*` parameter. > > --- > > gdb/sparc-linux-nat.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/gdb/sparc-linux-nat.c b/gdb/sparc-linux-nat.c > > index c644d441228..33a17afa21e 100644 > > --- a/gdb/sparc-linux-nat.c > > +++ b/gdb/sparc-linux-nat.c > > @@ -33,10 +33,10 @@ class sparc_linux_nat_target final : public linux_nat_target > > public: > > /* Add our register access methods. */ > > void fetch_registers (struct regcache *regcache, int regnum) override > > - { sparc_fetch_inferior_registers (regcache, regnum); } > > + { sparc_fetch_inferior_registers (this, regcache, regnum); } > > > > void store_registers (struct regcache *regcache, int regnum) override > > - { sparc_store_inferior_registers (regcache, regnum); } > > + { sparc_store_inferior_registers (this, regcache, regnum); } > > }; > > > > static sparc_linux_nat_target the_sparc_linux_nat_target; > > > > Thanks, this is OK, and sorry about the breakage. If you don't have > push access, tell me and I'll push it for you (but there's one commit > where you are the committer, so I presume you have push access). Ah, that's fine. Pushed as: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c290cb01fa (also included the gdb/ChangeLog bit). -- Sergei