From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27565 invoked by alias); 10 May 2008 22:28:30 -0000 Received: (qmail 27557 invoked by uid 22791); 10 May 2008 22:28:30 -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; Sat, 10 May 2008 22:27:54 +0000 Received: from kahikatea.snap.net.nz (7.63.255.123.dynamic.snap.net.nz [123.255.63.7]) by viper.snap.net.nz (Postfix) with ESMTP id D9B223DA086; Sun, 11 May 2008 10:27:51 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id C91208FC6D; Sun, 11 May 2008 10:27:50 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18470.8550.60850.331552@kahikatea.snap.net.nz> Date: Sun, 11 May 2008 14:29:00 -0000 To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Report the main thread. In-Reply-To: <20080510144501.GD28890@adacore.com> References: <18469.39280.284106.858072@kahikatea.snap.net.nz> <20080510144501.GD28890@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-05/txt/msg00347.txt.bz2 Joel Brobecker writes: > > Now that Joel has requested that I use observer_attach_new_thread for > > annotations this approach doesn't only produce MI output so it needs to > > be conditioned on MI: > > > > @@ -124,6 +124,10 @@ add_thread_silent (ptid_t ptid) > > tp->num = ++highest_thread_num; > > tp->next = thread_list; > > thread_list = tp; > > + > > + if (ui_out_is_mi_like_p (uiout)) > > + observer_notify_new_thread (tp); > > + > > return tp; > > } > > I am afraid this is not right. Could you elaborate more on what > the problem is? The problem is that Vladimir's patch means that the main thread is now reported, not only for MI, but whenever the new_thread observer is registered. -- Nick http://www.inet.net.nz/~nickrob