From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Tom Tromey <tom@tromey.com>,
Simon Marchi <simon.marchi@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] python: Add Progspace.objfiles method
Date: Thu, 13 Sep 2018 04:50:00 -0000 [thread overview]
Message-ID: <87efdyhufz.fsf@tromey.com> (raw)
In-Reply-To: <3d6d1484e08f5a40da317520443fb58d@polymtl.ca> (Simon Marchi's message of "Wed, 12 Sep 2018 18:58:27 -0400")
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>> Finally, I have another ancient and unfinished series that adds a bunch
>> of methods to Inferior. If you're working in this area I can send it;
>> I'd be happy to rebase it.
Simon> Sure!
I looked at this and it's in rougher shape. See
submit/python/inferior-additions on github. So maybe it can be mined as
a source for some things but it isn't close to landing.
It adds these methods to Inferior: attach, continue, stop, kill, and select.
It also adds a constructor so you can make a new inferior.
However nowadays I tend to think that inferior-control things, like
stop, should return some kind of promise that resolves when the request
completes. I think the code on the branch, on the other hand, supposes
that your code will wait for an event after making a request. My
experience from JS is that the promise-based approach is much simpler to
program and reason about, and now that Python has async+await, I think
gdb should try to follow. (If possible, I haven't looked at how
extensions deal with this stuff. And I used the JS terms which are
probably different in Python.)
Maybe the constructor patch could be completed pretty easily though.
Tom
next prev parent reply other threads:[~2018-09-13 4:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 19:37 [PATCH 1/3] python: Add Inferior.progspace property Simon Marchi
2018-09-12 19:36 ` [PATCH 3/3] python: Fix erroneous doc about gdb.objfiles() Simon Marchi
2018-09-12 21:46 ` Tom Tromey
2018-09-13 2:37 ` Eli Zaretskii
2018-09-13 2:42 ` Simon Marchi
2018-09-12 19:37 ` [PATCH 2/3] python: Add Progspace.objfiles method Simon Marchi
2018-09-12 22:01 ` Tom Tromey
2018-09-12 22:58 ` Simon Marchi
2018-09-13 4:50 ` Tom Tromey [this message]
2018-09-13 2:38 ` Eli Zaretskii
2018-09-12 21:42 ` [PATCH 1/3] python: Add Inferior.progspace property Tom Tromey
2018-09-12 22:22 ` Simon Marchi
2018-09-13 4:38 ` Tom Tromey
2018-09-13 22:16 ` Tom Tromey
2018-09-12 21:43 ` Tom Tromey
2018-09-13 2:37 ` Eli Zaretskii
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=87efdyhufz.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
--cc=simon.marchi@polymtl.ca \
/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