From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19056 invoked by alias); 11 May 2008 15:52:56 -0000 Received: (qmail 19013 invoked by uid 22791); 11 May 2008 15:52:56 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 May 2008 15:52:37 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3C9C72A985B; Sun, 11 May 2008 11:52:35 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pLqADLHJzhUi; Sun, 11 May 2008 11:52:35 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E362C2A9861; Sun, 11 May 2008 11:52:34 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B6B9CE7ACD; Sun, 11 May 2008 08:52:32 -0700 (PDT) Date: Sun, 11 May 2008 20:19:00 -0000 From: Joel Brobecker To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Report the main thread. Message-ID: <20080511155232.GH28890@adacore.com> References: <18469.39280.284106.858072@kahikatea.snap.net.nz> <18470.7609.400548.29643@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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-05/txt/msg00358.txt.bz2 > > I just want threads other than the main thread to be reported, as > > used to be the case. [...] > > That way I can create a threads buffer and display the thread > > number when there is more than one thread. > > Cannot you just suppress display of thread list if there's just one > thread reported, on UI side? I think it is important to be consistent between interpreters. If we have the annotation for MI, we should have it in the annotate mode as well. There has been a discussion earlier about the merits and drawbacks of adding the main "thread" to the list of threads when debugging an application that doesn't use threads. We only considered the perspective of the user, but there is indeed the case of front-ends. Assuming that the decision still stands, I think it is reasonable to ask the front-ends to check that there is more than one thread before going into "thread" mode. I understand that this is making things a little more complicated, but it shouldn't be that hard. On the other hand, if there is a way to detect that the new "thread" is from an unthreaded program, we could decide to not emit the notification. But I would like things to be consistent - it should be the same for both CLI, MI and annotations. -- Joel