From patchwork Sat Mar 11 17:03:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 19537 Received: (qmail 105982 invoked by alias); 11 Mar 2017 17:17:00 -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 105953 invoked by uid 89); 11 Mar 2017 17:16:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 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=priv 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; Sat, 11 Mar 2017 17:16:58 +0000 X-ASG-Debug-ID: 1489251835-0c856e65d4183dd10001-fS2M51 Received: from smtp.electronicbox.net (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id aHAiH9CjXQ8C8eqG (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Mar 2017 12:03:55 -0500 (EST) 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 BF293440E7C; Sat, 11 Mar 2017 12:03:55 -0500 (EST) From: Simon Marchi X-Barracuda-Effective-Source-IP: cable-11.246.173-162.electronicbox.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 v1.99 5/6] aix-thread: Use ptid from regcache instead of inferior_ptid Date: Sat, 11 Mar 2017 12:03:53 -0500 X-ASG-Orig-Subj: [PATCH v1.99 5/6] aix-thread: Use ptid from regcache instead of inferior_ptid Message-Id: <20170311170354.18468-6-simon.marchi@polymtl.ca> In-Reply-To: <20170311170354.18468-1-simon.marchi@polymtl.ca> References: <20170311170354.18468-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1489251835 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: 2153 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.37151 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-IsSubscribed: yes gdb/ChangeLog: * aix-thread.c (aix_thread_fetch_registers, aix_thread_store_registers): Use regcache->ptid instead of inferior_ptid. --- gdb/aix-thread.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index cf1a462216..3fbe96a736 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1297,8 +1297,8 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno, } } -/* Fetch register REGNO if != -1 or all registers otherwise in the - thread/process specified by inferior_ptid. */ +/* Fetch register REGNO if != -1 or all registers otherwise from the + thread/process connected to REGCACHE. */ static void aix_thread_fetch_registers (struct target_ops *ops, @@ -1308,11 +1308,11 @@ aix_thread_fetch_registers (struct target_ops *ops, pthdb_tid_t tid; struct target_ops *beneath = find_target_beneath (ops); - if (!PD_TID (inferior_ptid)) + if (!PD_TID (regcache_get_ptid (regcache))) beneath->to_fetch_registers (beneath, regcache, regno); else { - thread = find_thread_ptid (inferior_ptid); + thread = find_thread_ptid (regcache_get_ptid (regcache)); tid = thread->priv->tid; if (tid == PTHDB_INVALID_TID) @@ -1652,7 +1652,7 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno, } /* Store gdb's current view of the register set into the - thread/process specified by inferior_ptid. */ + thread/process connected to REGCACHE. */ static void aix_thread_store_registers (struct target_ops *ops, @@ -1662,11 +1662,11 @@ aix_thread_store_registers (struct target_ops *ops, pthdb_tid_t tid; struct target_ops *beneath = find_target_beneath (ops); - if (!PD_TID (inferior_ptid)) + if (!PD_TID (regcache_get_ptid (regcache))) beneath->to_store_registers (beneath, regcache, regno); else { - thread = find_thread_ptid (inferior_ptid); + thread = find_thread_ptid (regcache_get_ptid (regcache)); tid = thread->priv->tid; if (tid == PTHDB_INVALID_TID)