From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29062 invoked by alias); 29 Apr 2008 04:47:59 -0000 Received: (qmail 29051 invoked by uid 22791); 29 Apr 2008 04:47:58 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Apr 2008 04:47:31 +0000 Received: from kahikatea.snap.net.nz (173.30.255.123.static.snap.net.nz [123.255.30.173]) by viper.snap.net.nz (Postfix) with ESMTP id 60A533D8541; Tue, 29 Apr 2008 16:47:23 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 41A898FC6D; Tue, 29 Apr 2008 16:47:19 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18454.43094.168458.742737@kahikatea.snap.net.nz> Date: Tue, 29 Apr 2008 14:19:00 -0000 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] New annotation for threads In-Reply-To: <20080429023735.GD841@adacore.com> References: <18440.29531.916381.569346@kahikatea.snap.net.nz> <20080429023735.GD841@adacore.com> X-Mailer: VM 7.19 under Emacs 22.2.50.2 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-04/txt/msg00651.txt.bz2 > > This is just an annotation equivalent of Vladimir's patch for an observer > > for new threads. > > I'd really like to have others' opinions on this one. I thought that > we weren't going to change our annotations anymore. And even though > we were not going to remove annotations for a while longer, we were > going to focuse on MI instead. It doesn't impede MI development, so you could think of it as orthogonal. Clearly it can eventually be removed with the rest of annotations. > The change is sufficiently small that I'm thinking, why not, but can't > approve the suggestion just by myself. I would just use it to notify Emacs that an application was multi-threaded and display the selected thread number in the mode-line. It won't work if Vladimir's patch is approved in it's original form (Apr 26: [RFA] Report the main thread) but it now looks like any change made there will be just to MI which won't affect this patch. > Regarding the code itself: > > > 2008-04-18 Nick Roberts > > > > * annotate.h: (annotate_new_thread): New extern. > > > > * annotate.c (annotate_new_thread): New function. > > > > * thread.c (add_thread_with_info): Use it. > > How about creating a new observer for new_threads events instead of > specifically calling an annotation function from "add_thread"? Seems > much cleaner that way. I'm not sure what you mean, or how I would register such an observer. All other annotations are done this way and, unlike MI, annotations don't have their own interpreter but just mark up CLI. -- Nick http://www.inet.net.nz/~nickrob