From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18259 invoked by alias); 22 Apr 2009 01:37:16 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 18250 invoked by uid 22791); 22 Apr 2009 01:37:16 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: Thiago Jung Bauermann Cc: archer ml Subject: Re: [python][rfc] Add more attributes and methods to Inferior and InferiorThread. References: <1240094358.19777.15.camel@localhost.localdomain> From: Tom Tromey Reply-To: Tom Tromey Date: Wed, 22 Apr 2009 01:37:00 -0000 In-Reply-To: <1240094358.19777.15.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Sat\, 18 Apr 2009 19\:39\:17 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2009-q2/txt/msg00064.txt.bz2 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