From patchwork Tue Aug 18 15:53:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 8264 Received: (qmail 67972 invoked by alias); 18 Aug 2015 15:53:36 -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 67875 invoked by uid 89); 18 Aug 2015 15:53:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f42.google.com Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 18 Aug 2015 15:53:34 +0000 Received: by pawq9 with SMTP id q9so38315954paw.3 for ; Tue, 18 Aug 2015 08:53:32 -0700 (PDT) X-Received: by 10.68.230.33 with SMTP id sv1mr14819950pbc.160.1439913211935; Tue, 18 Aug 2015 08:53:31 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id fn15sm18590925pdb.50.2015.08.18.08.53.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Aug 2015 08:53:31 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 07/13] Make aarch64_notify_debug_reg_change the same on GDB and GDBserver Date: Tue, 18 Aug 2015 16:53:13 +0100 Message-Id: <1439913199-22882-8-git-send-email-yao.qi@linaro.org> In-Reply-To: <1439913199-22882-1-git-send-email-yao.qi@linaro.org> References: <1439913199-22882-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes gdb: 2015-08-18 Yao Qi * aarch64-linux-nat.c (aarch64_notify_debug_reg_change): Call current_lwp_ptid. gdb/gdbserver: 2015-08-18 Yao Qi * linux-aarch64-low.c (aarch64_notify_debug_reg_change): Call current_lwp_ptid. --- gdb/aarch64-linux-nat.c | 2 +- gdb/gdbserver/linux-aarch64-low.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index 4ccbe9e..aacc189 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -224,7 +224,7 @@ aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state, int is_watchpoint, unsigned int idx) { struct aarch64_dr_update_callback_param param; - ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid)); + ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ())); param.is_watchpoint = is_watchpoint; param.idx = idx; diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index 0ca2b0b..bfff7e4 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -307,7 +307,7 @@ aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state, int is_watchpoint, unsigned int idx) { struct aarch64_dr_update_callback_param param; - ptid_t pid_ptid = pid_to_ptid (pid_of (current_thread)); + ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ())); param.is_watchpoint = is_watchpoint; param.idx = idx;