This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [python][rfc] Add more attributes and methods to Inferior and InferiorThread.
- From: Tom Tromey <tromey at redhat dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: archer ml <archer at sourceware dot org>
- Date: Tue, 21 Apr 2009 19:37:03 -0600
- Subject: Re: [python][rfc] Add more attributes and methods to Inferior and InferiorThread.
- References: <1240094358.19777.15.camel@localhost.localdomain>
- Reply-to: Tom Tromey <tromey at redhat dot com>
Thiago> In particular, I'm not sure if the way I implemented is_remote
Thiago> and is_corefile is a good one, or a hack (it does work,
Thiago> though).
Haha, those look like they can't really be right :-)
I don't know the real answer though.
Thiago> Also, for the InferiorThread class, I wasn't sure which identifier to
Thiago> provide. I decided to provide the full ptid, as a tuple with the pid,
Thiago> lwp and tid.
I'm not sure about what bits are useful here, either.
Also, instead of a tuple, maybe a plain object with attributes, like
we do for the fields of a type? This seems friendlier in that users
won't have to remember the ordering.
Thiago> As for the thread state, Tromey's initial idea was to have one state
Thiago> method which would return the state. gdbthread.h says that the state_
Thiago> member of thread_info is private, though, and tells interested users to
Thiago> call is_{running,stopped,exited}. So I exposed these methods instead.
For the record, this is fine by me. I think we should probably pull
some of the comments from gdbthread.h into the documentation, so that
users can understand the differences here.
Tom