From patchwork Fri Feb 6 16:34:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 4942 Received: (qmail 6632 invoked by alias); 6 Feb 2015 16:34:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 6617 invoked by uid 89); 6 Feb 2015 16:34:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 06 Feb 2015 16:34:05 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t16GY32F032528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 6 Feb 2015 11:34:03 -0500 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t16GY1Ca001981 for ; Fri, 6 Feb 2015 11:34:02 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] libthread_db: attaching to terminated/joined threads, debug output Date: Fri, 6 Feb 2015 16:34:00 +0000 Message-Id: <1423240440-23906-1-git-send-email-palves@redhat.com> Add a bit of debug output that made things a bit easier for me before. gdb/ 2015-02-06 Pedro Alves * linux-thread-db.c (find_new_threads_callback): Add debug output. gdb/gdbserver/ 2015-02-06 Pedro Alves * thread-db.c (find_new_threads_callback): Add debug output. --- 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 + + * linux-thread-db.c (find_new_threads_callback): Add debug output. + 2015-02-06 Simon Marchi 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 + + * thread-db.c (find_new_threads_callback): Add debug output. + 2015-02-04 Pedro Alves * 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; }