From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id E558839524AC; Mon, 5 Dec 2022 21:39:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E558839524AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670276366; bh=fvMIFiNPqdHJg15gvb3mAEDU73esGC4eBFLunoxdRBc=; h=From:To:Subject:Date:From; b=oZVPXU2WlrKfEoTH7FFgNXrnjDT6B+Higjw+WEp4mnCKBBgU/Pyplh6VTJZT2GsfE xyXcktz/PkEdVfS2Zv6i8TeG+BSOB44JSv7PvOx+jhYJbgp5g1i0yOGgaYC4+L7vA3 keaEeZbZBOF8zs4rCbYlV3UUvDly6t927ucBYpH4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/linux-nat: add ptid parameter to linux_xfer_siginfo X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: d29ea3286809466a0f490a39d3f6c72cf69bfa17 X-Git-Newrev: 7154e7863505f6a8a18dc04696b5981ecee64a89 Message-Id: <20221205213926.E558839524AC@sourceware.org> Date: Mon, 5 Dec 2022 21:39:26 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7154e7863505= f6a8a18dc04696b5981ecee64a89 commit 7154e7863505f6a8a18dc04696b5981ecee64a89 Author: Simon Marchi Date: Fri Dec 2 15:09:25 2022 -0500 gdb/linux-nat: add ptid parameter to linux_xfer_siginfo =20 Make the inferior_ptid bubble up to linux_nat_target::xfer_partial. =20 Change-Id: I62dbc5734c26648bb465f449c2003c73751cd812 Diff: --- 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 aeb81cd01bd..1d207c4e31d 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3606,7 +3606,7 @@ siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_sigi= nfo, int direction) } =20 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; =20 - if (!linux_nat_get_siginfo (inferior_ptid, &siginfo)) + if (!linux_nat_get_siginfo (ptid, &siginfo)) return TARGET_XFER_E_IO; =20 /* 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); =20 - int pid =3D get_ptrace_pid (inferior_ptid); + int pid =3D get_ptrace_pid (ptid); errno =3D 0; ptrace (PTRACE_SETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo); if (errno !=3D 0) @@ -3672,7 +3672,7 @@ linux_nat_target::xfer_partial (enum target_object ob= ject, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) { if (object =3D=3D TARGET_OBJECT_SIGNAL_INFO) - return linux_xfer_siginfo (object, annex, readbuf, writebuf, + return linux_xfer_siginfo (inferior_ptid, object, annex, readbuf, writ= ebuf, offset, len, xfered_len); =20 /* The target is connected but no live inferior is selected. Pass