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.
This commit is contained in:
Pedro Alves 2015-01-26 17:52:25 +00:00
parent b9d6130764
commit d6c146e9ea
4 changed files with 15 additions and 0 deletions

View 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

View 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.

View 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;
}

View 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;
}