From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 5C90A3858C52 for ; Fri, 2 Dec 2022 20:14:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C90A3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 2B2KEViQ028902 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 2 Dec 2022 15:14:36 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 2B2KEViQ028902 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1670012076; bh=uTbTEMGsUNDiwQ95muB1S5jhorUepHiyxS1+aNu9SeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Etee6phiTafHn7oapz0w/XO8ffCd2CGxuFm/TRdocJB4qTgX+nhRzxNOwcY6+xhSj tz+H1fYpQcaea87wd0pMu50mP7i9vQ7ANrUAONN79F+wKIpBTG8tv7yA5t6hq+t+YZ fjAfuiiEazIKVMXIUruxalIp3gqVqg1seAN7s0Q8= Received: from simark.localdomain (unknown [217.28.27.60]) (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 ESMTPSA id AB7681E129; Fri, 2 Dec 2022 15:09:28 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 6/6] gdb/linux-nat: add ptid parameter to linux_xfer_siginfo Date: Fri, 2 Dec 2022 15:09:25 -0500 Message-Id: <20221202200925.245955-6-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221202200925.245955-1-simon.marchi@polymtl.ca> References: <20221202200925.245955-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 2 Dec 2022 20:14:31 +0000 X-Spam-Status: No, score=-3189.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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: Make the inferior_ptid bubble up to linux_nat_target::xfer_partial. Change-Id: I62dbc5734c26648bb465f449c2003c73751cd812 --- gdb/linux-nat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index aeb81cd01bd2..1d207c4e31d8 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3606,7 +3606,7 @@ siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction) } static enum target_xfer_status -linux_xfer_siginfo (enum target_object object, +linux_xfer_siginfo (ptid_t ptid, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) @@ -3620,7 +3620,7 @@ linux_xfer_siginfo (enum target_object object, if (offset > sizeof (siginfo)) return TARGET_XFER_E_IO; - if (!linux_nat_get_siginfo (inferior_ptid, &siginfo)) + if (!linux_nat_get_siginfo (ptid, &siginfo)) return TARGET_XFER_E_IO; /* When GDB is built as a 64-bit application, ptrace writes into @@ -3643,7 +3643,7 @@ linux_xfer_siginfo (enum target_object object, /* Convert back to ptrace layout before flushing it out. */ siginfo_fixup (&siginfo, inf_siginfo, 1); - int pid = get_ptrace_pid (inferior_ptid); + int pid = get_ptrace_pid (ptid); errno = 0; ptrace (PTRACE_SETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo); if (errno != 0) @@ -3672,7 +3672,7 @@ linux_nat_target::xfer_partial (enum target_object object, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) { if (object == TARGET_OBJECT_SIGNAL_INFO) - return linux_xfer_siginfo (object, annex, readbuf, writebuf, + return linux_xfer_siginfo (inferior_ptid, object, annex, readbuf, writebuf, offset, len, xfered_len); /* The target is connected but no live inferior is selected. Pass -- 2.38.1