From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1737 invoked by alias); 11 May 2008 14:29:35 -0000 Received: (qmail 1726 invoked by uid 22791); 11 May 2008 14:29:35 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 May 2008 14:29:17 +0000 Received: (qmail 28546 invoked from network); 11 May 2008 14:29:16 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 May 2008 14:29:16 -0000 From: Vladimir Prus To: Nick Roberts Subject: Re: [RFA] Report the main thread. Date: Sun, 11 May 2008 16:00:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb-patches@sources.redhat.com References: <18469.39280.284106.858072@kahikatea.snap.net.nz> <18470.65050.501601.790988@kahikatea.snap.net.nz> In-Reply-To: <18470.65050.501601.790988@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805111829.21105.vladimir@codesourcery.com> 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/msg00353.txt.bz2 On Sunday 11 May 2008 18:09:30 Nick Roberts wrote: > > > Yes, you're right. I didn't notice that the observer in > > > add_thread_with_info was removed at the same time this one was added. > > > > > > I just want threads other than the main thread to be reported, as used to > > > be the case. > > > > Assuming that makes sense for annotations, I think your observer is in > > position to decide which threads to report, and which not? > > Currently the new_thread observer only declares struct thread_info What do you mean? The observer does not declare struct thread_info, it declares a parameter having type 'struct thread_info'. > and not it's > members so I can't identify the thread number in annotate.c struct thread_info is defined in gdbthread.h. What prevents you from including that header? > > > 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? > > Yes, I could count the new-thread annotations and and only trigger things when > there is more than one thread. It's simpler if I don't have to and I'm just > baffled why I need to go through these hoops for a small stop gap change that > no-one else is interested in using. The only requirement I can see on such a > patch is that it doesn't affect anybody else's use of Gdb, and I think my > original patch filled that requirement. I have no opinion on this point (and I was not involved in the discussion of your original patch). - Volodya