From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VzQNG6gxXWIXcgAAWB0awg (envelope-from ) for ; Mon, 18 Apr 2022 05:38:48 -0400 Received: by simark.ca (Postfix, from userid 112) id 5C1891F327; Mon, 18 Apr 2022 05:38:48 -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 BB2851E150 for ; Mon, 18 Apr 2022 05:38:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E50DE3858C2D for ; Mon, 18 Apr 2022 09:38:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E50DE3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1650274726; bh=8aMgdQqA/wU8jW/HJu7fNU9yz18FatCThvB56V0sHB8=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=odz8T1MR/DgB83bFrGl8tMavhrh+I/VgkkuzshUVIG/nJKhjD9EnwZfFquhglDjdS qRqWMz7i7EGhe6BTj/ATUFJyXF1IxG+AFWygz5sbOenSbi4XZCAs/7KiQC9bGCv7v+ xFfiA3R6NtjfuEZTffXzc+GwQc0yuNs2L94NPvNc= Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id 825F03858D28 for ; Mon, 18 Apr 2022 09:38:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 825F03858D28 Received: by mail-lf1-x133.google.com with SMTP id x33so23400774lfu.1 for ; Mon, 18 Apr 2022 02:38:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vqGtlJpHyEBf2F1cRy4scsZqp15OADaQzMkZU2f1f5M=; b=xbrCC/Vq4/5LnVEEWyDS4zFbvK4S2xmmk3zajQFCjX8mp4K0FQ0dNO7Se6g+ldWAhc uRLagEPAvqw+NbdRi28cBwbNjpbLLVX85AH/PYZK3v369vS4PTUXgyaFnHraSkXx5Aa4 osEKubzaue+TALPUaEngo9MRx5l0P7vf7I5JnWSgXFaOmEGiMgBRlQOF6zgOzguV0w+1 j87Q9hmev2Cyg6gARXN5uYDq0OfZa0qC4EtnAgsYwRzA1bsrzHcK0fpYGBWwg+fPQjyO Ll1rRgK0Rmtjq+XA3dLEP3CGciVr460+8Wpdu42+HsZJVSsY31bDvns8Mzj+FrcKpt9I QWRQ== X-Gm-Message-State: AOAM531gqfrNPevfR2QfkjPpKqJjdyyYeFBRueqaZkY3vwsZyS8ovdnO DoYpUpPBazyDglyl1+q4QQj1x+fY5kI0WhxFgJw= X-Google-Smtp-Source: ABdhPJwweo8l62oUFCEBliVE4oq81CrlsIuCemZ20HqZO5IQVcs9y8MSn9+h+yi/tsOR/lpZ3vIJS4WzCO1k2iAfYV4= X-Received: by 2002:a05:6512:486:b0:46d:11ca:18fc with SMTP id v6-20020a056512048600b0046d11ca18fcmr7248754lfq.102.1650274705083; Mon, 18 Apr 2022 02:38:25 -0700 (PDT) MIME-Version: 1.0 References: <20220412090315.1142824-1-simon.farre.cx@gmail.com> <83v8va1660.fsf@gnu.org> In-Reply-To: <83v8va1660.fsf@gnu.org> Date: Mon, 18 Apr 2022 11:38:14 +0200 Message-ID: Subject: Re: [PATCH v2] gdb/Python: Added ThreadExitedEvent To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Simon Farre via Gdb-patches Reply-To: Simon Farre Cc: Simon Farre via Gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" I was unaware of the LWP not being cross-platform, perhaps this field should be removed then? Or is there some relevant/similar info on other platforms that can be returned here (and by that logic, also change the attribute to a name that logically could explain the attribute in a cross-platform manner?) On Fri, Apr 15, 2022 at 9:46 PM Eli Zaretskii wrote: > > 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? >