From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10791 invoked by alias); 13 Jul 2008 05:40:25 -0000 Received: (qmail 10783 invoked by uid 22791); 13 Jul 2008 05:40:24 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 13 Jul 2008 05:40:05 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KHuJW-0005YZ-9B for gdb-patches@sources.redhat.com; Sun, 13 Jul 2008 05:40:02 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jul 2008 05:40:02 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jul 2008 05:40:02 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [MI non-stop 01/11] Report thread state in -thread-info output. Date: Sun, 13 Jul 2008 05:40:00 -0000 Message-ID: References: <200806282034.58776.vladimir@codesourcery.com> <20080711134159.GC2651@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00255.txt.bz2 Daniel Jacobowitz wrote: > On Sat, Jun 28, 2008 at 08:34:58PM +0400, Vladimir Prus wrote: >> + if (tp->state_ == THREAD_EXITED) >> + state = "exited"; > > /* This field is internal to thread.c. Never access it directly, > use is_running instead. */ > int state_; > > Aren't there accessors you can use here? Well, we talked with Pedro about this, I believe. The issue now is that is_xxx function take ptid, and do lookup. The right solution would be to have is_xxx_ptid functions taking ptid and is_xxx functions taking thread_info*. Pedro, does this approach seem OK for you, in the end? Meanwhile, I've checked in the patch as posted. - Volodya