From patchwork Sun May 19 12:41:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 32761 Received: (qmail 12334 invoked by alias); 19 May 2019 12:41:44 -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 12318 invoked by uid 89); 19 May 2019 12:41:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=Multiple, describes, HContent-Transfer-Encoding:8bit X-HELO: mailsec109.isp.belgacom.be Received: from mailsec109.isp.belgacom.be (HELO mailsec109.isp.belgacom.be) (195.238.20.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 19 May 2019 12:41:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1558269701; x=1589805701; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qo+u+H1gFyfgp4r27H1A87e8hYa1uisVnG0Ip1OVeGY=; b=g8raow/oXxKwJRTy+x8APZJrmluHeub9pbBJJ8540mM45TJeL19ZUE/6 DChNA1hrBoZkknqdJDkQPjItJG64Iw==; Received: from 161.32-242-81.adsl-dyn.isp.belgacom.be (HELO md) ([81.242.32.161]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 19 May 2019 14:41:38 +0200 Message-ID: <1558269697.1454.11.camel@skynet.be> Subject: Re: [RFA] Give thread names in thread events, give Ada task names in more output. From: Philippe Waroquiers To: Eli Zaretskii Cc: gdb-patches@sourceware.org Date: Sun, 19 May 2019 14:41:37 +0200 In-Reply-To: <83r28v8u1j.fsf@gnu.org> References: <20190518182306.22937-1-philippe.waroquiers@skynet.be> <83r28v8u1j.fsf@gnu.org> Mime-Version: 1.0 X-IsSubscribed: yes On Sat, 2019-05-18 at 22:03 +0300, Eli Zaretskii wrote: > > From: Philippe Waroquiers > > Cc: Philippe Waroquiers > > Date: Sat, 18 May 2019 20:23:06 +0200 > > > > With this patch, we e.g. get: > > [New Thread 0x7ffff701b700 (LWP 13891) "sleepers"] > > [Switching to thread 2 (Thread 0x7ffff781c700 (LWP 13890) "sleepers")] > > instead of: > > [New Thread 0x7ffff701b700 (LWP 13918)] > > [Switching to thread 2 (Thread 0x7ffff781c700 (LWP 13917))] > > > > For Ada tasks, we e.g. get: > > [Switching to task 2 task_list(1)] > > [Current task is 2 task_list(1)] > > instead of > > [Switching to task 2] > > [Current task is 2] > > Except for Ada, the names are only available on some platforms, right? > Should we mention that in the manual? The manual currently describes the thread name and the way GDB shows the 'system thread name' only some systems in the command 'thread name' in the node 'Debugging Programs with Multiple Threads'. What about the below addition ? diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 9de56061d9..8361d68cef 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -3284,6 +3284,9 @@ disable printing of messages when @value{GDBN} notices that new threads have  started or that threads have exited.  By default, these messages will  be printed if detection of these events is supported by the target.  Note that these messages cannot be disabled on all targets. +The thread event message contains the thread name if @value{GDBN} can determine +its value by retrieving it from the OS or by using the thread name given by +the user (see @code{thread name}, above).    @kindex show print thread-events  @item show print thread-events