Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: sami wagiaalla <swagiaal@redhat.com>
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [patch] Support inferior events in python
Date: Thu, 03 Feb 2011 18:26:00 -0000	[thread overview]
Message-ID: <83sjw5asa7.fsf@gnu.org> (raw)
In-Reply-To: <4D4ADA8A.40507@redhat.com>

> Date: Thu, 03 Feb 2011 11:40:42 -0500
> From: sami wagiaalla <swagiaal@redhat.com>
> CC: gdb-patches@sourceware.org
> 
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -40,6 +40,14 @@
>  
>    ** gdb.parameter("directories") is now available.
>  
> +  ** Python Support for Inferior events.
> +     Python scripts can add observers to be notified of events
> +     occurring the in process being debugged.
> +     The following events are currently supported:
> +     - gdb.events.cont Continue event.
> +     - gdb.events.exited Inferior exited event.
> +     - gdb.events.stop Signal received, and Breakpoint hit events.
> +

OK for this part.

> +* Events In Python::            Listening for events from GDB.
                                                             ^^^
"@value{GDBN}" instead of a literal "GDB".

> +GDB provides a general event facility so that Python code can be
   ^^^
Ditto.

> +In order to be notified of an event, you must register an event handler
> +with an event registry.  An @dfn{event registry} is an object in the
           ^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^
Please use @dfn when you first use the new term.  In this case, in the
previous sentence.

> +@defmethod EventRegistry connect callable
> +Add the given callable object to the registry.  This object will be called
> +when an event corresponding to this registry occurs.

"callable" should have the @var markup.

> +@defmethod EventRegistry disconnect callable
> +Remove the given object from the registry.  Once removed the object will no
                                                          ^^^
Same here.  And please add the missing comma after "removed".

Also, isn't it better to use "object" as the argument instead of
"callable"?  How about this:

  @defmethod EventRegistry connect object
  Add the given callable @var{object} to the registry.  This object will
  be called when an event corresponding to this registry occurs.
  @end defmethod

> +registry @code{events.exited}.  Once connected @code{exit_handler} receives
                                                ^^
A missing comma.

> +notifications of exited events.  The argument @dfn{event} in this example is

Hmm... "receives notifications" is not really true, is it?  It gets
called when exit events happen, right?

> +@item events.cont
> +Emits @code{gdb.ThreadEvent}

Please add a period at the end of this sentence.

> +Some events can be thread specific when GDB is running in non-stop mode.  When
                                           ^^^
"@value{GDBN}"

> +represented in python these events all extend @code{gdb.ThreadEvent}.  Note,
                  ^^^^^^
Should be "Python", right?  And please add a comma after it.

> +Emits @code{gdb.ContinueEvent} which extends @code{gdb.ThreadEvent}

A period at the end, please.

> +Emits @code{gdb.StopEvent} which extends @code{gdb.ThreadEvent}

Likewise.

> +Indicates that the inferior has stopped. All events emitted by this registry
> +extend StopEvent. As a child of @code{gdb.ThreadEvent} @code{gdb.StopEvent}
> +will indicate the stopped thread when gdb is running in non-stop mode. Refer
> +to @code{gdb.ThreadEvent} above for more details.

This paragraph needs two spaces after each sentence, not one.

Also, a comma is missing here:

> +extend StopEvent. As a child of @code{gdb.ThreadEvent} @code{gdb.StopEvent}
                                                        ^^^
And you need to use "@value{GDBN}" again here:

> +will indicate the stopped thread when gdb is running in non-stop mode. Refer
                                         ^^^

> +Emits @code{gdb.SignalEvent} which extends @code{gdb.StopEvent}

Period.

> +Also emits  @code{gdb.BreakpointEvent} which extends @code{gdb.StopEvent}

Period.

> +@end table

This "@end table" is misplaced, it should have been after this:

> +@table @code
> +@defivar SignalEvent stop_signal
> +A string representing the signal received by the inferior.  A list of possible
> +signal values can be obtained by running the command @code{info signals} in
> +the @value{GDBN} command prompt.
> +@end defivar

OK with those changes.

Thanks.


  reply	other threads:[~2011-02-03 18:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 15:54 sami wagiaalla
2011-01-04 18:22 ` Eli Zaretskii
2011-01-04 20:09 ` Tom Tromey
2011-01-17 22:59   ` sami wagiaalla
2011-01-19 16:42     ` Tom Tromey
2011-01-21 23:06       ` sami wagiaalla
2011-01-28 16:21         ` Tom Tromey
2011-02-02 21:04           ` sami wagiaalla
2011-02-02 21:35             ` Tom Tromey
2011-02-03 16:41               ` sami wagiaalla
2011-02-03 18:26                 ` Eli Zaretskii [this message]
2011-02-03 19:45                   ` sami wagiaalla
2011-02-03 21:42                 ` Tom Tromey
2011-02-04 20:07                   ` sami wagiaalla
2011-02-04 20:29                     ` Tom Tromey
2011-02-04 20:35                       ` sami wagiaalla
2011-02-04 23:00                         ` Paul Pluzhnikov
2011-02-05  5:44                           ` Hui Zhu
2011-02-07 15:22                             ` sami wagiaalla
2011-02-07 15:24                               ` Tom Tromey
2011-02-07 15:34                                 ` Paul Pluzhnikov
2011-02-07 16:01                                   ` sami wagiaalla
2011-02-07 15:39                                 ` sami wagiaalla
2011-04-20 20:26                         ` Patch for non-stop remote assertion (was: RE: [patch] Support inferior events in python) Marc Khouzam
2011-04-25 18:12                           ` Patch for non-stop remote assertion Tom Tromey
2011-04-25 18:31                             ` Marc Khouzam
2011-05-16 15:41                               ` Marc Khouzam
2011-05-19 18:38                               ` Tom Tromey
2011-02-09  7:55                     ` [patch] Support inferior events in python Jan Kratochvil
2011-02-09 16:19                       ` sami wagiaalla
2011-02-09 16:30                         ` Jan Kratochvil
2011-02-11 15:28                           ` sami wagiaalla
2011-02-11 15:55                             ` Joel Brobecker
2011-02-11 19:19                               ` sami wagiaalla
2011-02-11 19:46                                 ` Jan Kratochvil
2011-02-11 15:57                             ` Pedro Alves
2011-02-14 17:36                               ` sami wagiaalla
2011-02-16 11:48                                 ` Jan Kratochvil
2011-07-06 19:42                                   ` Jan Kratochvil
2011-07-07 13:51                                     ` sami wagiaalla
2011-07-07 14:03                                       ` Jan Kratochvil
2011-09-13 21:45                                       ` Jan Kratochvil

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=83sjw5asa7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=swagiaal@redhat.com \
    --cc=tromey@redhat.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