Make aarch64_notify_debug_reg_change the same on GDB and GDBserver
authorYao Qi <yao.qi@linaro.org>
Tue, 25 Aug 2015 10:38:29 +0000 (11:38 +0100)
committerYao Qi <yao.qi@linaro.org>
Tue, 25 Aug 2015 10:39:13 +0000 (11:39 +0100)
gdb:

2015-08-25  Yao Qi  <yao.qi@linaro.org>

* aarch64-linux-nat.c (aarch64_notify_debug_reg_change):
Call current_lwp_ptid.

gdb/gdbserver:

2015-08-25  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (aarch64_notify_debug_reg_change):
Call current_lwp_ptid.

gdb/ChangeLog
gdb/aarch64-linux-nat.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-aarch64-low.c

index aa33c81..06d7411 100644 (file)
@@ -1,5 +1,10 @@
 2015-08-25  Yao Qi  <yao.qi@linaro.org>
 
+       * aarch64-linux-nat.c (aarch64_notify_debug_reg_change):
+       Call current_lwp_ptid.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
        * aarch64-linux-nat.c (debug_reg_change_callback): Use
        debug_printf.
 
index 3721fea..867f8c4 100644 (file)
@@ -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;
index 2a7dc0b..df5b914 100644 (file)
@@ -1,5 +1,10 @@
 2015-08-25  Yao Qi  <yao.qi@linaro.org>
 
+       * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
+       Call current_lwp_ptid.
+
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
        * linux-aarch64-low.c (debug_reg_change_callback): Use
        debug_printf.
 
index 0ca2b0b..bfff7e4 100644 (file)
@@ -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;