From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38458 invoked by alias); 11 Sep 2017 11:54:53 -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 38449 invoked by uid 89); 11 Sep 2017 11:54:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1977 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Sep 2017 11:54:51 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v8BBsipX011620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Sep 2017 07:54:49 -0400 Received: by simark.ca (Postfix, from userid 112) id E5F591ECDF; Mon, 11 Sep 2017 07:54:44 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id A8BFB1EA17; Mon, 11 Sep 2017 07:54:33 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 11 Sep 2017 11:54:00 -0000 From: Simon Marchi To: Tom Tromey Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [RFA 1/3] Add new_inferior, inferior_deleted, and new_thread events In-Reply-To: <87k216gr0w.fsf@bapiya> References: <20170909003353.25883-1-tom@tromey.com> <20170909003353.25883-2-tom@tromey.com> <831sngxsxi.fsf@gnu.org> <87zia38kts.fsf@bapiya> <54e2a3aa0b6ce348363eca135ab86c4d@polymtl.ca> <87k216gr0w.fsf@bapiya> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 11 Sep 2017 11:54:45 +0000 X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00301.txt.bz2 On 2017-09-10 23:52, Tom Tromey wrote: >>>>>> "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 LGTM, but please give Eli time to comment. SImon