This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 07/13] Make aarch64_notify_debug_reg_change the same on GDB and GDBserver
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 18 Aug 2015 16:53:13 +0100
- Subject: [PATCH 07/13] Make aarch64_notify_debug_reg_change the same on GDB and GDBserver
- Authentication-results: sourceware.org; auth=none
- References: <1439913199-22882-1-git-send-email-yao dot qi at linaro dot org>
gdb:
2015-08-18 Yao Qi <yao.qi@linaro.org>
* aarch64-linux-nat.c (aarch64_notify_debug_reg_change):
Call current_lwp_ptid.
gdb/gdbserver:
2015-08-18 Yao Qi <yao.qi@linaro.org>
* 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;
--
1.9.1