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 aa33c81b0ae85c354eacd6cd1a514a528ed3a2c0..06d741135b32d9eba09a76cdafc5fa06d3ffb611 100644 (file)
@@ -1,3 +1,8 @@
+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
index 3721feac06795cc664cd1ad4cb9a564ab6927031..867f8c4007d07db24291846a6cb7bd155739be6c 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 2a7dc0b2ebe47024f7c9c89fd686f0870685f073..df5b914d68c66c035d845c48e79b4a8d72d72401 100644 (file)
@@ -1,3 +1,8 @@
+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
index 0ca2b0b25fb2eb5dcdf83070ccd531869f61b76a..bfff7e4a88756cdc55d51151cef41aa6ad5951fb 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;