public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Oguz Kayral <oguzkayral@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Phil Muldoon <pmuldoon@redhat.com>, archer@sourceware.org
Subject: Re: Python inferior control
Date: Thu, 26 Aug 2010 15:02:00 -0000	[thread overview]
Message-ID: <AANLkTikpxyVaWLZiP58Y06ZcWQTczeqrLjh45vB9SkN3@mail.gmail.com> (raw)
In-Reply-To: <m3ocd6xpgp.fsf@fleche.redhat.com>

On 13 August 2010 21:49, Tom Tromey <tromey@redhat.com> wrote:
> It still seems like a lot of code to define a new event.  But I think we
> will just live with that.  Or maybe there is some way to reduce its
> size, through macros or something.  There seems to be a fair amount of
> boilerplate.

This bothers me too, very little work is done with a lot of code.
Actually creating an event is straightforward but it requires coding
custom constructors, getter/setters, emit functions everytime. What
can we do to make this easier?

> I see new attributes like "stop_eventregistry".  I think we should drop
> the "registry" part of these names.

(not specific to stop, applies for all events.)
A stop_eventregistry is not a stop_event. A stop_eventregistry
contains the functions to be called when the inferior stops, a
stop_event contains information about the event(stop_reason etc.). We
can drop it if we can find a way to avoid confusion.

> I see that all the existing event registries are on the Thread object.
> I think this is fine, but I think we will also want to add more.  In
> particular:
> * We want some way to determine that the entire inferior has exited.

We decided to concentrate on thread events during GSoC. Please bring
out any events that you can think of so I can add them.

> * It seems logical to want to be able to put an event handler on a
>  breakpoint, to notice when that breakpoint is hit.

Can't breakpoint_stop_event already do this? I think it does *lack of docs* :-)

> There are probably more of these.  I don't mind if we add them as needed
> -- but it would be nice if the first release incorporating the event
> machinery were complete enough to enable some "nice" scripts.
>
> I am not sure about all of the logic in emit_stop_event.  Is this a full
> enumeration of stop reasons?  Also I am unsure about python_thread_exit.
> Looking at $_exitcode seems strange -- a thread doesn't really have an
> exit code, only the inferior as a whole does.
>
> One place to look for ideas here is how MI does it...

The idea originally came from MI but it's wrong. Thanks for pointing this out.

  reply	other threads:[~2010-08-26 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 14:54 Phil Muldoon
2010-08-13 19:49 ` Tom Tromey
2010-08-26 15:02   ` Oguz Kayral [this message]
2010-08-26 20:28     ` Tom Tromey
2010-09-20 16:13       ` Matt Rice
2010-09-21 21:48         ` Tom Tromey
2010-08-15 17:42 ` Richard Ward
2010-08-26 20:23   ` Tom Tromey
2010-08-25 16:10 ` Phil Muldoon
2010-12-01 18:58 ` sami wagiaalla

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=AANLkTikpxyVaWLZiP58Y06ZcWQTczeqrLjh45vB9SkN3@mail.gmail.com \
    --to=oguzkayral@gmail.com \
    --cc=archer@sourceware.org \
    --cc=pmuldoon@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).