This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] python: Add Progspace.objfiles method
>>>>> "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