From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DDg2AZLLWWIqdAAAWB0awg (envelope-from ) for ; Fri, 15 Apr 2022 15:46:26 -0400 Received: by simark.ca (Postfix, from userid 112) id E46AA1F327; Fri, 15 Apr 2022 15:46:25 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 715181E150 for ; Fri, 15 Apr 2022 15:46:25 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2B2A385736D for ; Fri, 15 Apr 2022 19:46:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2B2A385736D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1650051984; bh=ZZwk8uGFxFgJsGD/aXk7DcuUnfCe769Y8rA3xpnTU4c=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nA787cPmSttkTw5yZtsqnPMe2Ss5tFm0FUqFPckDTTbnvGzUjRNRb4uSqaFdzfg4C 4jP1cm5U9dfijTpRnZL9qhYYOd953XYP6wx9d8cW+L+SBoCRY3THZM2cKyk5tU1xvA UxybQsFvuoTytD/M9I5jfL4ezcVbLDq/hOQXM/K4= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 0580C385842B for ; Fri, 15 Apr 2022 19:46:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0580C385842B Received: from fencepost.gnu.org ([2001:470:142:3::e]:38138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfRtL-00027E-El; Fri, 15 Apr 2022 15:46:03 -0400 Received: from [87.69.77.57] (port=2379 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfRtK-0002DD-9q; Fri, 15 Apr 2022 15:46:03 -0400 Date: Fri, 15 Apr 2022 22:46:15 +0300 Message-Id: <83v8va1660.fsf@gnu.org> To: Simon Farre In-Reply-To: <20220412090315.1142824-1-simon.farre.cx@gmail.com> (message from Simon Farre via Gdb-patches on Tue, 12 Apr 2022 11:03:15 +0200) Subject: Re: [PATCH v2] gdb/Python: Added ThreadExitedEvent References: <20220412090315.1142824-1-simon.farre.cx@gmail.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Date: Tue, 12 Apr 2022 11:03:15 +0200 > From: Simon Farre via Gdb-patches > > diff --git a/gdb/NEWS b/gdb/NEWS > index 760cb2b7abc..985121d5818 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -38,6 +38,9 @@ maintenance info line-table > This is the same format that GDB uses when printing address, symbol, > and offset information from the disassembler. > > + ** gdb.ThreadExitedEvent added. Emits LWP ID, TID and GLOBAL NUM of the > + exiting thread. > + > *** Changes in GDB 12 This part is OK. > diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi > index 7c414b01d70..9a410dc18f8 100644 > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -3568,6 +3568,22 @@ This has a single attribute: > The new thread. > @end defvar > > +@item events.thread_exited > +This is emitted when @value{GDBN} notices a thread has exited. The event > +is of type @code{gdb.ThreadExitedEvent}. This has three attributes: > + > +@defvar ThreadExitedEvent.num > +Global thread number. > +@end defvar > + > +@defvar ThreadExitedEvent.lwp > +The light weight process ID. > +@end defvar > + > +@defvar ThreadExitedEvent.tid > +The thread's thread id > +@end defvar This is also OK, but I wonder whether we should say something about the lwp part that it isn't available on all platforms?