From patchwork Tue Mar 14 03:18:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 19559 Received: (qmail 57851 invoked by alias); 14 Mar 2017 03:19:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 56932 invoked by uid 89); 14 Mar 2017 03:18:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=HCc:D*ca, Hx-languages-length:2904 X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Mar 2017 03:18:23 +0000 X-ASG-Debug-ID: 1489461501-0c856e65d5188acc0001-fS2M51 Received: from smtp.electronicbox.net (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id d8U4yFSxWusEDsgW (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Mar 2017 23:18:21 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.lan (173-246-11-162.qc.cable.ebox.net [173.246.11.162]) by smtp.electronicbox.net (Postfix) with ESMTP id 6CE18440E7C; Mon, 13 Mar 2017 23:18:21 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 173-246-11-162.qc.cable.ebox.net[173.246.11.162] X-Barracuda-Apparent-Source-IP: 173.246.11.162 X-Barracuda-RBL-IP: 173.246.11.162 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 01/10] arm-linux-nat.c: Use ptid from regcache instead of inferior_ptid Date: Mon, 13 Mar 2017 23:18:10 -0400 X-ASG-Orig-Subj: [PATCH 01/10] arm-linux-nat.c: Use ptid from regcache instead of inferior_ptid Message-Id: <20170314031819.745-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1489461501 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 3047 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.37208 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-IsSubscribed: yes gdb/ChangeLog: * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs, store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs, store_vfp_regs): Use ptid from regcache. --- gdb/arm-linux-nat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index c8474a9f4f..ad3085a25c 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -76,7 +76,7 @@ fetch_fpregs (struct regcache *regcache) gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE]; /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); /* Read the floating point state. */ if (have_ptrace_getregset == TRIBOOL_TRUE) @@ -113,7 +113,7 @@ store_fpregs (const struct regcache *regcache) gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE]; /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); /* Read the floating point state. */ if (have_ptrace_getregset == TRIBOOL_TRUE) @@ -167,7 +167,7 @@ fetch_regs (struct regcache *regcache) elf_gregset_t regs; /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); if (have_ptrace_getregset == TRIBOOL_TRUE) { @@ -194,7 +194,7 @@ store_regs (const struct regcache *regcache) elf_gregset_t regs; /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); /* Fetch the general registers. */ if (have_ptrace_getregset == TRIBOOL_TRUE) @@ -242,7 +242,7 @@ fetch_wmmx_regs (struct regcache *regcache) int ret, regno, tid; /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); ret = ptrace (PTRACE_GETWMMXREGS, tid, 0, regbuf); if (ret < 0) @@ -268,7 +268,7 @@ store_wmmx_regs (const struct regcache *regcache) int ret, regno, tid; /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); ret = ptrace (PTRACE_GETWMMXREGS, tid, 0, regbuf); if (ret < 0) @@ -307,7 +307,7 @@ fetch_vfp_regs (struct regcache *regcache) struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); if (have_ptrace_getregset == TRIBOOL_TRUE) { @@ -336,7 +336,7 @@ store_vfp_regs (const struct regcache *regcache) struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); /* Get the thread id for the ptrace call. */ - tid = ptid_get_lwp (inferior_ptid); + tid = ptid_get_lwp (regcache_get_ptid (regcache)); if (have_ptrace_getregset == TRIBOOL_TRUE) {