From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LBsTIhrLhWDCTQAAWB0awg (envelope-from ) for ; Sun, 25 Apr 2021 16:03:38 -0400 Received: by simark.ca (Postfix, from userid 112) id 7C2901F11C; Sun, 25 Apr 2021 16:03:38 -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 C910A1E01F for ; Sun, 25 Apr 2021 16:03:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 195493857C44; Sun, 25 Apr 2021 20:03:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 195493857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619381017; bh=BEX3rxZG4h79bkB4PTvX/MD2H8IhgPDrj7Qk5KDp7AY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=elMuVyT4uEw/y+9V5JzrVFb0XOX09+wqkIKMIxI8RIEEHu8cJnMBxH61x1FtOeF3z ctldfPS+UD6vZSGEuu9HHRkSOR0q9htDOBKAQCwY5sKCqhRXTu41Sp867bTq4hJeIg HapBqwMtf9Yr7V/BbTM6OFx9SDgR+q3/r7M53Ccs= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id C4FAA3857C44 for ; Sun, 25 Apr 2021 20:03:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C4FAA3857C44 Received: by sf.home (Postfix, from userid 1000) id 111995A22061; Sun, 25 Apr 2021 21:03:29 +0100 (BST) To: gdb-patches@sourceware.org Subject: [PATCH] gdb: fix sparc build failure of linux-nat Date: Sun, 25 Apr 2021 21:03:24 +0100 Message-Id: <20210425200324.1953421-1-slyfox@gentoo.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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; -- 2.31.1