From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
Subject: Re: [RFA 1/3] Add new_inferior, inferior_deleted, and new_thread events
Date: Sun, 10 Sep 2017 19:37:00 -0000 [thread overview]
Message-ID: <54e2a3aa0b6ce348363eca135ab86c4d@polymtl.ca> (raw)
In-Reply-To: <87zia38kts.fsf@bapiya>
On 2017-09-10 02:21, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> I find the resulting documentation page about Python Events a
> bit hard
> Simon> to follow. The "events.new_thread" event registry refers to the
> Simon> gdb.ThreadEvent type, which itself is defined under the
> "events.cont"
> Simon> registry. There it says that inferior_thread is always not None
> in
> Simon> none-stop, and always None in all-stop. That is contradictory
> with
> Simon> the text under "events.new_thread". If it is possible for event
> types
> Simon> to be emitted by different event registries, I think they should
> be
> Simon> documented separately (on the same page, but in two sections).
>
> How about this doc patch instead?
That's fine with me, I think it makes it clear enough that the comments
about the inferior_thread field under events.cont don't apply here.
> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index 32d7939..1e96dbc 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 notified 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 notified 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 emitted when @value{GDBN} notices a new thread. The event is of
"This emitted". I also noticed that for other events you used "This is
notified". Perhaps it would be better to stick with "This is emitted"
everywhere to be consistent.
If Eli is fine with this version of the doc, I think this patch is ready
to go in.
Thanks,
Simon
next prev parent reply other threads:[~2017-09-10 19:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-09 0:34 [RFA 0/3] add a few Python events Tom Tromey
2017-09-09 0:34 ` [RFA 2/3] Small event ownership clean up in Python layer Tom Tromey
2017-09-09 17:05 ` Simon Marchi
2017-09-09 0:34 ` [RFA 1/3] Add new_inferior, inferior_deleted, and new_thread events Tom Tromey
2017-09-09 6:55 ` Eli Zaretskii
2017-09-09 16:47 ` Simon Marchi
2017-09-09 20:41 ` Tom Tromey
2017-09-09 21:09 ` Simon Marchi
2017-09-10 0:21 ` Tom Tromey
2017-09-10 19:37 ` Simon Marchi [this message]
2017-09-10 21:52 ` Tom Tromey
2017-09-11 11:54 ` Simon Marchi
2017-09-11 14:29 ` Eli Zaretskii
2017-09-09 16:48 ` Simon Marchi
2017-09-09 0:34 ` [RFA 3/3] Make it simpler to add events to Python Tom Tromey
2017-09-09 14:40 ` Tom Tromey
2017-09-09 17:05 ` Simon Marchi
2017-09-10 0:24 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54e2a3aa0b6ce348363eca135ab86c4d@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox