libthread_db: attaching to terminated/joined threads, debug output
authorPedro Alves <palves@redhat.com>
Mon, 26 Jan 2015 17:52:25 +0000 (17:52 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 6 Feb 2015 15:57:06 +0000 (15:57 +0000)
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.

gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/thread-db.c
gdb/linux-thread-db.c

index dbeef19e1d65422321071e0a9a5d8f8bdff320dc..03c85f2fe6615b0d43023c29c4f99d733d9f1b1b 100644 (file)
@@ -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
index f55add23d77f4c7884ac199d45ef6df208056fda..866e2d66a231d3a61f9918191b58229c316e6e0f 100644 (file)
@@ -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.
index b0d1f0d945a4b38532cda1c5e152637c7e164e14..2185245289a38743950993999d3fd9ed6812cb80 100644 (file)
@@ -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;
     }
 
index 156cfe75e23f21ca9814d3c5d978e3fcb92fd6eb..6b525a0a5c7c9ef8508e5a530684b39d65540eeb 100644 (file)
@@ -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;
     }
 
This page took 0.035231 seconds and 4 git commands to generate.