From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28347 invoked by alias); 11 May 2008 13:31:16 -0000 Received: (qmail 28338 invoked by uid 22791); 11 May 2008 13:31:15 -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, 11 May 2008 13:30:55 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JvBdc-0006RM-1f for gdb-patches@sources.redhat.com; Sun, 11 May 2008 13:30:52 +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, 11 May 2008 13:30:52 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 May 2008 13:30:52 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [RFA] Report the main thread. Date: Sun, 11 May 2008 14:45:00 -0000 Message-ID: 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-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.5 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/msg00349.txt.bz2 Nick Roberts wrote: > > > 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); > > > > This patch, IIUC, will cause the new_thread observer to be notified only > > in MI mode. Then, no observer except for MI one will ever be called? > > Then, why those non-MI observers exist? > > > > Or to put in other way, I think this patch will make you annotation > > observers to be never called. Is this what you want? > > 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? > 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? - Volodya