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] libthread_db: attaching to terminated/joined threads, debug output


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

commit d6c146e9ea09e050e6f05fa00312de3fe763e811
Author: Pedro Alves <palves@redhat.com>
Date:   Mon Jan 26 17:52:25 2015 +0000

    libthread_db: attaching to terminated/joined threads, debug output
    
    Add a bit of debug output that made things a bit easier for me before.
    
    gdb/
    2015-02-06  Pedro Alves  <palves@redhat.com>
    
    	* linux-thread-db.c (find_new_threads_callback): Add debug output.
    
    gdb/gdbserver/
    2015-02-06  Pedro Alves  <palves@redhat.com>
    
    	* thread-db.c (find_new_threads_callback): Add debug output.

Diff:
---
 gdb/ChangeLog             | 4 ++++
 gdb/gdbserver/ChangeLog   | 4 ++++
 gdb/gdbserver/thread-db.c | 3 +++
 gdb/linux-thread-db.c     | 4 ++++
 4 files changed, 15 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dbeef19..03c85f2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-06  Pedro Alves  <palves@redhat.com>
+
+	* linux-thread-db.c (find_new_threads_callback): Add debug output.
+
 2015-02-06  Simon Marchi  <simon.marchi@ericsson.com>
 
 	PR gdb/15678
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index f55add2..866e2d6 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-06  Pedro Alves  <palves@redhat.com>
+
+	* thread-db.c (find_new_threads_callback): Add debug output.
+
 2015-02-04  Pedro Alves  <palves@redhat.com>
 
 	* linux-low.c (handle_extended_wait): Don't resume LWPs here.
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index b0d1f0d..2185245 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -404,6 +404,9 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
 	 thread that previously exited and was joined.  (glibc marks
 	 terminated and joined threads with kernel thread ID -1.  See
 	 glibc PR17707.  */
+      if (debug_threads)
+	debug_printf ("thread_db: skipping exited and "
+		      "joined thread (0x%lx)\n", ti.ti_tid);
       return 0;
     }
 
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 156cfe7..6b525a0 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1639,6 +1639,10 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
 	 thread that previously exited and was joined.  (glibc marks
 	 terminated and joined threads with kernel thread ID -1.  See
 	 glibc PR17707.  */
+      if (libthread_db_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "thread_db: skipping exited and "
+			    "joined thread (0x%lx)\n", ti.ti_tid);
       return 0;
     }


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