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] Print tid in debug output of debug_reg_change_callback


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

commit dfe7f77c4aae3376c175d8af4d477124c8817427
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 25 14:08:45 2015 +0100

    Print tid in debug output of debug_reg_change_callback
    
    In debug_reg_change_callback, we change debug registers of each LWP.
    It makes more sense to print LWP's pid rather than group leader's pid.
    
    gdb:
    
    2015-08-25  Yao Qi  <yao.qi@linaro.org>
    
    	* nat/aarch64-linux-hw-point.c (debug_reg_change_callback):
    	Rename local variable pid to tid, and get lwpid of lwp.  Update
    	debug output.

Diff:
---
 gdb/ChangeLog                    |  6 ++++++
 gdb/nat/aarch64-linux-hw-point.c | 10 +++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8746f60..49f491d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-25  Yao Qi  <yao.qi@linaro.org>
+
+	* nat/aarch64-linux-hw-point.c (debug_reg_change_callback):
+	Rename local variable pid to tid, and get lwpid of lwp.  Update
+	debug output.
+
 2015-08-25  Pierre-Marie de Rodat  <derodat@adacore.com>
 
 	* ada-lang.c (ada_read_var_value): Add a var_block argument
diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c
index ba235e5..a3c923a 100644
--- a/gdb/nat/aarch64-linux-hw-point.c
+++ b/gdb/nat/aarch64-linux-hw-point.c
@@ -239,7 +239,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 (ptid_of_lwp (lwp));
+  int tid = ptid_get_lwp (ptid_of_lwp (lwp));
   int idx = param_p->idx;
   int is_watchpoint = param_p->is_watchpoint;
   struct arch_lwp_info *info = lwp_arch_private_info (lwp);
@@ -255,8 +255,8 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
   if (show_debug_regs)
     {
       debug_printf ("debug_reg_change_callback: \n\tOn entry:\n");
-      debug_printf ("\tpid%d, dr_changed_bp=0x%s, "
-		    "dr_changed_wp=0x%s\n", pid,
+      debug_printf ("\ttid%d, dr_changed_bp=0x%s, "
+		    "dr_changed_wp=0x%s\n", tid,
 		    phex (info->dr_changed_bp, 8),
 		    phex (info->dr_changed_wp, 8));
     }
@@ -281,8 +281,8 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
 
   if (show_debug_regs)
     {
-      debug_printf ("\tOn exit:\n\tpid%d, dr_changed_bp=0x%s, "
-		    "dr_changed_wp=0x%s\n", pid,
+      debug_printf ("\tOn exit:\n\ttid%d, dr_changed_bp=0x%s, "
+		    "dr_changed_wp=0x%s\n", tid,
 		    phex (info->dr_changed_bp, 8),
 		    phex (info->dr_changed_wp, 8));
     }


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