Make debug_reg_change_callback 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)
This patch makes function debug_reg_change_callback in GDB and GDBserver
look the same, so that the following patch can move them to
nat/aarch64-linux-hw-point.c.

gdb:

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

* aarch64-linux-nat.c (debug_reg_change_callback): Use
ptid_of_lwp to get ptid of lwp.

gdb/gdbserver:

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

* linux-aarch64-low.c (debug_reg_change_callback): Use
ptid_of_lwp to get ptid of lwp.

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

index 867f8c4007d07db24291846a6cb7bd155739be6c..354d8f8da7f209c77fb9d0f5abc1cf7033e65d8d 100644 (file)
@@ -165,7 +165,7 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
 {
   struct aarch64_dr_update_callback_param *param_p
     = (struct aarch64_dr_update_callback_param *) ptr;
-  int pid = ptid_get_pid (lwp->ptid);
+  int pid = ptid_get_pid (ptid_of_lwp (lwp));
   int idx = param_p->idx;
   int is_watchpoint = param_p->is_watchpoint;
   struct arch_lwp_info *info = lwp->arch_private;
index bfff7e4a88756cdc55d51151cef41aa6ad5951fb..4c482a92d31166855b0109deb20af316a2abb7c7 100644 (file)
@@ -252,7 +252,7 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
 {
   struct aarch64_dr_update_callback_param *param_p
     = (struct aarch64_dr_update_callback_param *) ptr;
-  int pid = pid_of (lwp->thread);
+  int pid = ptid_get_pid (ptid_of_lwp (lwp));
   int idx = param_p->idx;
   int is_watchpoint = param_p->is_watchpoint;
   struct arch_lwp_info *info = lwp->arch_private;