From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71658 invoked by alias); 10 Sep 2017 21:52:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 71433 invoked by uid 89); 10 Sep 2017 21:52:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy10-pub.mail.unifiedlayer.com Received: from gproxy10-pub.mail.unifiedlayer.com (HELO gproxy10-pub.mail.unifiedlayer.com) (69.89.20.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Sep 2017 21:52:52 +0000 Received: from CMOut01 (unknown [10.0.90.82]) by gproxy10.mail.unifiedlayer.com (Postfix) with ESMTP id 4763214056E for ; Sun, 10 Sep 2017 15:52:51 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id 7xso1w0092f2jeq01xsrPL; Sun, 10 Sep 2017 15:52:51 -0600 X-Authority-Analysis: v=2.2 cv=K4VSJ2eI c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=2JCJgTwv5E4A:10 a=_ZhYKdCeAAAA:8 a=cKvAhxShtOSm-zLomLkA:9 a=uqOk3ZSnBfCTOznnrPA1:22 Received: from 75-166-76-94.hlrn.qwest.net ([75.166.76.94]:48090 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1drA9o-0021nE-1p; Sun, 10 Sep 2017 15:52:48 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [RFA 1/3] Add new_inferior, inferior_deleted, and new_thread events References: <20170909003353.25883-1-tom@tromey.com> <20170909003353.25883-2-tom@tromey.com> <831sngxsxi.fsf@gnu.org> <87zia38kts.fsf@bapiya> <54e2a3aa0b6ce348363eca135ab86c4d@polymtl.ca> Date: Sun, 10 Sep 2017 21:52:00 -0000 In-Reply-To: <54e2a3aa0b6ce348363eca135ab86c4d@polymtl.ca> (Simon Marchi's message of "Sun, 10 Sep 2017 21:37:18 +0200") Message-ID: <87k216gr0w.fsf@bapiya> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Exim-ID: 1drA9o-0021nE-1p X-Source-Sender: 75-166-76-94.hlrn.qwest.net (bapiya) [75.166.76.94]:48090 X-Source-Auth: tom+tromey.com X-Email-Count: 12 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes X-SW-Source: 2017-09/txt/msg00294.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Simon> "This emitted". I also noticed that for other events you used "This Simon> is notified". Perhaps it would be better to stick with "This is Simon> emitted" everywhere to be consistent. How's this then? Tom diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 32d7939..39def2a 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -2989,6 +2989,39 @@ invalid state; that is, the @code{is_valid} method will return This event carries no payload. It is emitted each time @value{GDBN} presents a prompt to the user. +@item events.new_inferior +This is emitted when a new inferior is created. Note that the +inferior is not necessarily running; in fact, it may not even have an +associated executable. + +The event is of type @code{gdb.NewInferiorEvent}. This has a single +attribute: + +@defvar NewInferiorEvent.inferior +The new inferior, a @code{gdb.Inferior} object. +@end defvar + +@item events.inferior_deleted +This is emitted when an inferior has been deleted. Note that this is +not the same as process exit; it is notified when the inferior itself +is removed, say via @code{remove-inferiors}. + +The event is of type @code{gdb.InferiorDeletedEvent}. This has a single +attribute: + +@defvar NewInferiorEvent.inferior +The inferior that is being removed, a @code{gdb.Inferior} object. +@end defvar + +@item events.new_thread +This is emitted when @value{GDBN} notices a new thread. The event is of +type @code{gdb.NewThreadEvent}, which extends @code{gdb.ThreadEvent}. +This has a single attribute: + +@defvar NewThreadEvent.inferior_thread +The new thread. +@end defvar + @end table @node Threads In Python