This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make aarch64_notify_debug_reg_change the same on GDB and GDBserver


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a8a7965f233f571b78f7992292a31c990c15a5e

commit 4a8a7965f233f571b78f7992292a31c990c15a5e
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 25 11:38:29 2015 +0100

    Make aarch64_notify_debug_reg_change the same on GDB and GDBserver
    
    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.

Diff:
---
 gdb/ChangeLog                     | 5 +++++
 gdb/aarch64-linux-nat.c           | 2 +-
 gdb/gdbserver/ChangeLog           | 5 +++++
 gdb/gdbserver/linux-aarch64-low.c | 2 +-
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index aa33c81..06d7411 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
 
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index 3721fea..867f8c4 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/ChangeLog b/gdb/gdbserver/ChangeLog
index 2a7dc0b..df5b914 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -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.
 
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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]